It is possible to have a select field in your form pull options from a resource. In this article we'll be giving a walk through of how to set this up for your mobile form.
To do this you simply need to upload an Excel spreadsheet or connect a Google Sheet Live Resource. The example below uses an Excel Resource, however the same basics apply for a Google Sheet Resource.
Spreadsheet Formatting Requirements:
- The first row is interpreted as column headers
- The rest of the rows are data
- Do not include any duplicate values within a column to be set as an identifier column (more information below)
- No empty rows between data
- Commas or ampersand signs should not be present in your data set
- Remove any filtering
- Text format is preferred for cell data
Once you have a resource you can attach it to your Select question in the Designer.
Upload/Attach your Resource
First click on your Select question. In the Field Properties Box on the right hand side, next to "Select Options", choose "Options from Resource".
Next, click "Select Resource".
You will be able to either upload the Excel file or select the resource you uploaded previously from the File List.
Note: To learn how to upload resources outside the Form Designer, click here.
Link your Options
Finally, you have 3 settings to link your Resources:
- Options Table: This is the name of the Sheet in your Excel file, where the options have been saved.
- Identifier Column: This is the value that gets sent to the server. (This can be the same as the "Text Column", but needs to be unique values)
- Text Column: These are the options that the user sees on the mobile form.
Save the form and test the form on your mobile device after refreshing your Forms tab.
If you need to make any edits to your select list, just simply edit your resource and this will take effect on all associated forms.
Note: Options are always pulled as text. If your options are numbers and you'd to use these to perform calculations in Calculated Questions, then please used the
TO_NUMBER() function in your expression to change the text to a number.
Other Useful Articles:
- Filtered Select Questions
- Resources Overview
- Update your Resource
- Google Sheet Live Resource
- Device Magic Database Live Resource
- Map Overlay Resource
If you have any questions or comments, please send us a message at firstname.lastname@example.org.