Push Data to Other Questions from a Data Source

About

Use a Data SourceClosed Data sources, also known as "Lookups", are external sources of data that you upload or connect to TrueContext. You can reference this data in a form to populate answers or answer options. Data sources save typing, reduce errors, and make it easy to provide mobile users with only the relevant, most current data. to prefill fields in a form based on the answer to a previous question. This can:

  • Provide key information to your field users.
  • Save field users time.
  • Reduce errors by prefilling important information.

This article will discuss ways to auto-fill questions based on a single answer, using dropdown or radio button questions and data sourcesClosed Data sources, also known as "Lookups", are external sources of data that you upload or connect to TrueContext. You can reference this data in a form to populate answers or answer options. Data sources save typing, reduce errors, and make it easy to provide mobile users with only the relevant, most current data..

Example Form

For example, a building inspection form could push address information based on a building selection. It could also populate a repeatable sectionClosed A Repeatable Section is a subform that contains a set of related questions. The data captured is “repeating”, because the field user can complete the same subform more than once, which creates multiple entries. with information about the floors in the building, so that a user can inspect them.  

2017-11-20-SamplePush01.png 2017-11-20-SamplePush02.png 2017-11-20-SamplePush03.png
This is the blank form, before any Building Name has been selected. Here, you can see the empty Address and City fields, and the empty Repeatable Section. Here, the mobile user selects a building from the dropdown. The address and city questions have been filled out, and the Repeatable Section has three entries automatically populated. 

Populate Answers in a Regular Section

In our example, a user in the field is filling out a building inspection form. They select a single building from a dropdown or radiobutton question using a data source, and a single address and city are filled in. 

Sample Data Source: 

2017-11-20-PushDataSource.png

The Building column is used as the list of options in the dropdown. When a building is selected, the Address and City cells from the same row of the data source will be used to populate additional questions. 

Set it up:

  1. Create your radiobutton or dropdown question. The radiobutton/dropdown question must come before the questions you are pushing data to.
    2018-10-01-V2FB-QuestionPush-01.png

  2. In the Options tab, select Use Data Source for Options. Select the appropriate data source options.

  3. Under Push Data to Other Questions, select Populate questions on the main form.

    • You can select or create questions to populate.
      • To create a question, type the question name in the text box, then hit enter. Once the Dropdown or Radiobutton question is saved, this will create a Text Field question with a Free Text data type. If you need a different data type, edit the target question afterwards.
      • To select an existing question, find it in the dropdown menu beneath Main form questions to populate. Please ensure that the data type being pushed matches the question data type. For example, do not push text into a date field.
      • You can push answers to: Text field, text area, dropdown, radiobutton, multiselect, date, time, date/time selector, duration field.
    • Select the appropriate data source column to populate the answer from.
      2018-10-01-V2FB-QuestionPush-02.png
  4. You can push answers to: Text field, text area, dropdown, radiobutton, multiselect, date, time, date/time selector, duration field. 
    • When setting up these questions, ensure that the data type being pushed matches the question data type. Do not push text into a date field, and so on.
    • You can push answers to: Text field, text area, dropdown, radiobutton, multiselect, date, time, date/time selector, duration field. 
    • When setting up these questions, ensure that the data type being pushed matches the question data type. Do not push text into a date field, and so on.

Pushing Multiple Answers into a Multiselect

2018-05-31-PushAddlAnswers.png

It is possible to push multiple answers into a Multiselect from a Dropdown question.

An example of this would be having a field worker verifying that they have the correct Personal Protective Equipment (PPE) by selecting it from a dropdown, and that dropdown selecting the hazards it covers.  

This configuration requires a particular setup in the data source associated with the Dropdown: the data source cell being pushed must have multiple items in the same cell, separated by a newline. The options must also be valid selections for the Multiselect. So, using our example above, the data source used in the dropdown would look something like this:

PPE Type Hazards Covered
Gloves

Corrosive Material
Toxic Material

Respirator

Dust
Toxic Gases
Vapors
Fumes

Hard Hat

Falling Material

Safety Glasses

Chemical Liquid Splashes
Dust

When setting up the Multiselect, you must either manually map the answers to the multiselect using the Defined Here option in the Multiselect configuration or have a second data source containing all the options. An example is shown below:

2018-10-01-V2FB-QuestionPush-03.png

Populate Answers in a Repeatable Section

You can use a Data Source to populate entries in a subform based on a previous selection in the main form.

  1. Set up a Dropdown or Radio Button question.

  2. On the Options tab, select Populate questions in a repeatable section.

    Result: The section expands to display additional options.

  3. Select the Repeatable Section from the list. Only sections that come after the question are listed.

    Note:You can only push data one level in. For example, you can push data from the main form to a subform, but not to a nested subform.

  4. Optionally, customize the sort order (Enterprise tier only). For example if you sort by Availability and Supplier, those columns determine the row order. The following example shows the results on an iOS device.

    Subform Summary Table that shows all available entries first, sorted next by supplier

    Tip:If you want to maintain this row order in the data record that’s submitted, select the option to Prevent users from reordering entries in the restrictions settings.

  5. Select the questions to populate, or create them by typing in the text box.

Display in the Form Builder

Icons to the right of the questions in the Form BuilderClosed The Form Builder is the tool that form designers use to create forms. In the Form Builder, accessed from the TrueContext Web Portal, form designers can add and edit pages, sections, and questions, as well as attach data destinations and configure the form's settings. main form display will show what the source question is for the pushed data, and which ones are pushed to.

2018-10-01-V2FB-QuestionPush.png