The following sections provide guidance on the effective use of column headers:
See also: Display column headers in table views
How AppSheet identifies column headers
AppSheet uses the following heuristics to locate your spreadsheet's header row:
- Assumes that rows containing bold text are more likely header rows.
When all of your data values are bold text, this can mislead AppSheet header detection. In this case, making your header row bold, helps AppSheet find your header row. - Examines the data value in each cell of the row and tries to determine each cell's data type based on the cell's value.
If AppSheet determines that the cell's value is one of the known data types, then it can be fairly confident the row contains data and is not a header. - Examines the format value in each cell of the row.
If the cell's format matches one of the known data types, then AppSheet can be fairly confident the row contains data and is not a header. - Examines the text value in each cell of the row.
If the cell's text value is a frequently occurring header word like "Name", "Address", "Amount", "Total", and so forth, AppSheet can be fairly confident the row is a header. - Assumes rows that appear closer to the top of the sheet are more likely to be header rows.
However, people sometimes create multi-row headers where the last header row is actually the most meaningful (or the most specific) header row, so AppSheet attempts to recognize multi-row headers.
How AppSheet infers column types from headers
AppSheet infers the types of columns from the column header names as well as from the content of the rows. Especially in cases where there are no existing data rows, it is important to pay attention to the column header names.
There are special words in column headers that AppSheet will use to infer column data types. For example, a column header name Web Site suggests that the data is of the URL
type. Currently, this only works with English but we intend to add similar capabilities for other languages in the future.
There are a few special cases to be aware of:
- A column header ending with a question mark is inferred as a
Yes/No
data type. - A column header ending with an exclamation mark is inferred as an action URL
- A column header whose name is similar to another table already in the app may be inferred as a table
Ref
type. For example, if there is a table calledProducts
and a new spreadsheet is added with a column calledProduct
orProducts
, AppSheet will infer that it is aRef
type.
If you are building an app from a Google Form and your question is marked as Text
, a similar inference process occurs on the question title.
Here is a complete list of field types, what they do, and the words AppSheet uses to infer the column data type.
Address
Full postal address that can be displayed as a map pin on a Google map. The completeness of the address will increase the accuracy of the map pin location.
ChangeCounter
Numeric counter value reflecting how many times an entry has been changed.
N/A
Configure type in editor
ChangeLocation
Latitude and longitude value reflecting the current GPS location where an entry has been changed.
N/A
Configure type in editor
ChangeTimestamp
Date and time value reflecting when an entry has been changed.
N/A
Configure type in editor
Color
Color value. By default the value can be any one of the standard color values: blue, green, orange, purple, red, or yellow. You can specify other color values when defining the field. You can populate the color field using an expression in the InitialValue
or AppFormula
field. That expression can compute the color value based on the value of other fields in the record.
Date
Date value that specifies a year, month, and day.
DateTime
Date and time value that specifies a year, month, day, hour, minute, and second.
Decimal
Decimal number with a specified decimal precision.
Drawing
What it does:
A Drawing
field contains a drawing or notes that you can enter through your application. You can choose from a set of seven colors when entering the drawing.
Trigger words:
Duration
Duration
field contains a time duration specified in hours, minutes, and seconds.Trigger words: d
Email
What it does:
An Email
field contains an email address. You can use the email address to send an email.
Trigger words:
Enum
What it does:
An Enum
field contains one value from a specified list of values. The list of values can be obtained in several ways.
- You can enter the list values manually in the app editor when you define the field.
- The list values can be obtained from a Data Validation rule you specify in your sheet.
- The list values can be obtained from another table in your AppSheet application.
Trigger words:
EnumList
One or more values from a specified list of values. You specify the list of values from which the user can pick as described for Enum
above.
N/A
Configure type in editor
File
Reference to a data file in your cloud drive, such as a PDF or document file, by adding a string indicating the location of the file in relation to the spreadsheet. AppSheet will locate the file and add a link to it from the app. For example: Reference/guide.pdf
Image
Reference to an image in .jpg
, .png
, or .gif
format. It allows you to capture images from your mobile device's camera or camera roll.
LatLong
Latitude and longitude value as 48.5564, -122.3421
. It allows you to capture the current location from your mobile device's GPS. The field value can be displayed as a map pin on Google Maps.
LongText
Name
Name of a person, place, or thing.
Number
Positive or negative integer value.
Percent
Percent value with a specified decimal precision.
Phone
Telephone number value. Your application can call or text this number.
Postal Code
ZIP code or postal code value. Typically, the postal code is part of a multi-column field consisting of a Street
column, City
column, State/Province
column, optional Country
column, and a Postal Code
column. AppSheet creates a multi-column Address
field that combines the values from these columns.
Price
Decimal number with a specified decimal precision and currency symbol.
Ref
Reference to a specific record in another table. When you define the Ref
field, you specify the name of the target table. Each Ref
field value is the key value of a specific record in the target table. A Ref
field is the equivalent of a foreign key field in a relational database.
N/A
Configure type in editor
Signature
Signature. It allows you to capture a signature on your mobile device. Each captured signature is saved to its own file on the app creator’s Google Drive. The name of this file is stored in the Signature
field.
Thumbnail
Small image. It is exactly like an Image
field except the captured images are expected to be smaller.
Time
Time value that specifies an hour, minute, and second.
URL
URL value. When an application user clicks the field value, the default device browser will load the page
Yes/No
Value of True
, False
, or Not specified
. The field value is displayed as Y
(True), N
(False), or N/A
(Not specified). A Yes/No
field is the equivalent of a Boolean field in a relational database.