How to query from a Google sheet

ABOUT

You can use Formotus forms to query from Google Sheets.  This allows you to pull a list of data from a Google sheet and incorporate the data within your form. 

HOW TO QUERY FROM A GOOGLE SHEET

In this example, I will be using a Dropdown control in my Formotus form to query a Google sheet.  I will configure my Dropdown control to pull data from a Google sheet column.  All you need is an existing Google sheet that has some data within it. 

Step 1. (Once you have a Google Sheet to query)

In your Formotus Creator form, add a Dropdown control to gather data

dropdown_control_1.png

Step 2.

Add a Query DATA SOURCE.  In the right panel of the Formotus Creator, select Data > Query > +DATA SOURCE

data_source_wizard.png

In the popup that appears, select Google Sheets and the NEXT button.

google_data_source.png

Next, you must fill out the Query data from a Google Spreadsheet wizard.

google_query_wizard_1.png

Name: Enter a name for the data connection (spaces and special characters are not accepted)

Google information

Spreadsheet URL: Get the shareable link for your Google sheet.  Make sure you go to the Sharing Settings and select Anyone with the link can edit, and copy the link and paste it in the Spreadsheet URL field.  Note: By default, the shareable link will have can view selected, please select the can edit option before continuing.  

Sheet Name: Type the sheet name here (Sheet1)

Query Options:

  • Query data on load: With this option checked, your form will automatically query the spreadsheet data when the form is opened (and the form has connectivity).
  • Offline Cache: If you form is installed and you plan on going offline, this option will pull and save the data in your dropdown for offline use. The dropdown will not update with new data, but it will show data cached when installed.

Configuration: Here you specify what column you want to query from your Google Sheet.  In this example I selected the State field to query, then selected DONE to finish the wizard.

Step 3.

Edit the Dropdown control data source. Select your dropdown and click the EDIT DATA SOURCE button. 

google_query_DS_1.png

Complete the  Add items from data source wizard

google_query_DS_wizard_1.png

In the Data source field, select the data source (GoogleQuery) you want to query.  For Value and Display Name select the Google sheet column you want to populate your Dropdown control.

This is all I will do for this data source, but you can Show unique values only or Enable Filtering.

Once the data source is connected to your Dropdown control, select SAVE & PUBLISH and your form is ready to be used on your mobile device. 

In my simple form example, the Dropdown control I set up with a data source now shows the three values in the State column of my Google sheet.

google_query_device_1.png

google_query_sheet_1.png

You'll notice in the pictures above that the values in the Dropdown control on my device match those I queried from my Google sheet.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.