AppSheet does its best to automatically order columns in order of importance. If you’re using the Tabular or Grouped List views, or the Table view, you can manually control column order.
After describing how AppSheet automatically orders columns, we describe how you can manually control column order.
How AppSheet automatically orders columns
AppSheet automatically orders columns using these rules:
- Rule 1. We always show the key because the key, by definition, uniquely identifies each row. Without the key, it is unclear which data entry is being shown. If the key is hidden (by checking the “Hidden” checkbox in the Editor), we don’t show the key and instead show the data left to right. You can read more about how to pick an appropriate key here.
- Rule 2. Next we add any fields that call for 'actionable' icons (eg: a phone number, email address, etc). AppSheet assumes these items are things you'd want a 'quick click' action on. If Explicit column headers are enabled (in the UX>Style tab of the Editor), we don’t show actionable icons.
- Rule 3. Then we proceed left to right in spreadsheet column order-- if some columns are more important to you, please move them to the left in the spreadsheet.
- Rule 4. Many spreadsheets have a rightmost column that is computed by a formula-- eg: cost of items. If we recognize this pattern, we make sure to include this column.
Let’s see how this works in a real app built with AppSheet: a cost estimator put together by a fictional auto repair shop to calculate the resulting total profit from jobs done in one week.
First, let’s take a look at the original spreadsheet-- there are four columns: Service, Total, Cost, and Type.
Once the app is created from the spreadsheet, either through AppSheet’s Google Sheets add-on or straight from AppSheet.com, you can now view it live in the app emulator.
You’ll note that my leftmost column, Service, is showing first in the app. Since the Service column is the first column in my spreadsheet and the items within the column don’t repeat twice, AppSheet chose Service as the key for my app-- so that’s what shows first.
If you click into any of the entries in the app, you’ll be able to see the rest of the columns and data.
Manually ordering columns
You can control column order using the Editor's UX>Views tab.
- Click the edit icon next to the view whose columns you want to reorder.
- Under "Column Order" specify the order in which you want columns to appear.
Let's see how this works in the Profit Calculator app.
Originally, my columns were ordered according to my spreadsheet, with "Service" first and then "Total" next. But let's say that I would like to instead see "Type" and "Cost" first.
To do this, in the Editor>UX>Views tab, I'll first click the edit icon next to the view I want to edit. Then, in the ColumnOrder field, I'll click the "+" button for each column that I want to see in the main view.
Now, the main Table view of my app is ordered the way I wish: