A worksheet's primary column is the column used to uniquely identify rows and is demarcated with a key icon: . This unique identifier or display name appears when rows are expanded, when rows are Related between worksheets, or as the display name on Kanban cards.
By default, the first column of a worksheet is the primary column but this can be changed. However, only columns of certain data types can serve as the primary column. The primary column is also where indented and outdented row hierarchies are noted with plus or minus icons. Each worksheet can only have one primary column and the primary column cannot be deleted or hidden.
For instance, the primary column in the worksheet above is the last name of candidates being considered for open positions. But the primary column could also be your task names in a project plan, a unique Id number to identify open bugs in your team's bug tracker, or dates in a daily tracker of sales. Ideally, you would pick the data point that most uniquely identifies each row for your primary column and can change the default primary column.
Topics in this Article
- How to Set the Primary Column
- Primary Column Data Type Restrictions
- Changing the Primary Column
- Creating Hierarchies in the Primary Column
How to Set the Primary Column
By default, the first column of a worksheet (Column A) is set as the primary column and is demarcated by the key icon next to the column name . Users with Owner or Manager access to a workbook can designate a different column as the primary column.
To designate a different column as a primary column, right-click on the column or click on the column header drop-down, and select Set as primary column.
Sometimes, this option will be greyed out and cannot be selected.
The Set as primary column option is greyed out when the desired column is currently set to a restricted data type—a data type that the primary column cannot be set as. To fix, either hange the data type of the desired column or pick a different column to be your primary column.
Primary Column Data Type Restrictions
The primary column only supports alphanumeric data types. Specifically, the following data types:
- Date & time
- Column formula
While editing the data type of the primary column, you can change its data type to other alphanumeric data types only. Conversely, a column with any of the following data types cannot be designated as a primary column: Attachment, Related row, User, Checkbox, Select, Multiselect, Rating, Icon set, Related row lookup, and System columns (like Updated by and Created at). If you try to change one of these columns to the primary column, the Set as primary column option will be greyed out.
While the primary column can have empty or duplicate values, it is best to ensure that the cell values in the primary column are filled to help in uniquely identifying rows. You can use the Autonumber data type to avoid duplicate values in the primary column.
Changing the Primary Column
To change the primary column, your target primary column must conform to one of the above data types. After changing the primary column, the previous primary column will no longer provide the primary means of identifying a row. The cell values of the new primary column will now serve as row identifiers.
To change the primary column, select the desired column and either right-click or select the column drop-down and pick Set as primary column.
In the animation below, column C in our Employees sheet is a related row lookup, pulling the primary column value from the Locations sheet. When we change the primary column, in Locations, it changes the lookup value in Employees.
Creating Hierarchies in the Primary Column
The primary column is also used to define hierarchies. Hierarchy allows you to define and organize tasks and sub-tasks. For instance, in the image below some rows are expanded to show all tasks, while some parent rows are collapses to hide their child tasks.
For complete insight into creating hierarchies, see our creating row hierarchies article. Or see our animation below for a quick view on how to indent and outdent rows.
Primary Column and Related Rows
One unique feature of Spreadsheet.com is that you can relate data between worksheets. This allows you to store all of your data in one source, but reference it in others. In cases where this related row relationship is defined, the cell values in primary columns serve as labels for the entire row. Any changes made to cell values in the primary column are automatically synced to all related sheet cells.
For instance, in the two worksheets below, the Candidate worksheet attaches candidates to the jobs they applied for. The worksheet on the left has a related row column displaying the relevant cell values from the Job Openings primary column on the right.
Rows have a unique row too, the table header row, which is used to delineate between header information and table data. Or check out our Introduction to Columns article for more information on columns other than the primary column.