Lookup Field

Last Updated: Aug 20, 2019 02:27PM CET
Adding the Lookup field to your form allows you to fetch data from another form (source form) or spreadsheet.

You can use the Lookup field to:​
1. Populate the Choice field Options from a different form
Lookup allows you to fetch submitted response from a form and then fill a Choice field on your lookup form with the fetched data. For example, you have a store and the store manager has to update an inventory form with the available products in the store. You will also like to keep stock of product order and will need the information from the inventory form to do this effectively. Rather than always going to the spreadsheet of the inventory form for information, you can lookup the inventory form such that when the store manager updates the form, it is reflected on your product order form which makes work easier for you and the store manager. This will save you time and improve your efficiency. This type of lookup is specific for prefilling a choice field on your lookup form. From the edit pop-up of the lookup field, you can select which of the choice fields you will like the lookup field to be - Basic select (default), Multiple Select, Checkboxes, and Radio buttons. After selecting this, you can then select which of the forms in your account should be used as the source form as well as which field data should be displayed in the selected choice field in your lookup field. See this article for more information on using the Basic Lookup Field

2. Autocomplete form with responses from another form. -
This option fills a form automatically from responses gotten from another form when a respondent makes a form submission. For example, you have a club membership form with which you use to receive members registration details and you also need them to fill in another form. All you need to do is lookup data from the previously filled form that will be used as an autocomplete for the new form and the other details are manually filled. Next, you need your club members to fill out another form. But because you already have their details, you can easily save them time by looking up their membership form (source form) such that when they fill out a field, then every other field you have looked up will automatically be pre-populated with their data and then they can go ahead with filling out other necessary details.  This type of lookup is used if you will like to partially fill the form for the respondent using the data inputted from the source form. See this article for more details on using the Autocomplete option.
How To Use the Lookup Field
To use the Lookup feature, you will need two forms on your Formplus account. One form that has the lookup field, which the data will be referenced to (the LookUp form) and the form from which data will be extracted from (The source form). 
In your Lookup form (the form with the lookup field): Add the lookup field to the form and select your preferred options from the edit icon of the lookup field. The lookup field options are described below.

The LookUp Field options.
The lookup field can be found under the Advanced Input section on the Builder page. It has the basic options like every other field on the builder, i.e you can edit, duplicate and delete this field.
Aside from the basic option for fields, the edit modal of the lookup field also has the following options:

1. What should this field do? (Lookup Type) - This is where you select what the lookup field should do. The option selected in this segment determines the options that will be displayed in the drop-down list of the next select box - Select Field type. The drop-down displays two options - 
  •  Populate choice options from a form - To import data into a Lookup choice option field from a source form. This option is especially used if you want to only populate choice fields - Checkboxes, Radio, Basic select, and Multiple select. 
  • Autofill Lookup (Autocomplete this form with responses from a different form)- To complete form fields using data from a source form.
2. Select Field type - Here, you select the type of field that you want your lookup field to be displayed as. For example, if you choose an email field as your lookup field type, then the field will require a valid email input otherwise it throws an error.
 The field types displayed in this option is dependent on what you have chosen in the previous segment (Lookup type).

If you select the option to prepopulate form field from a different form in the Lookup type segment, then the dropdown in the select field type segment will display a list of choice option - Basic select, Checkboxes, Radio button.
If you select the option to Autocomplete form with responses from a different form in the Lookup type segment, then the dropdown in the select field type segment will display the list of fields - Short text, Email, Number, Basic select, Radio button.

3. Field Labels - Just like every other field, this is the segment where you name your lookup field. By default, the field is named Lookup, and this segment is where you change the name of the field to your preferred name.
4. Select Form - At this stage, you select your source form.  When you click on the select box, a list of forms available on your account is displayed or if you are in a team (link to an introduction to teams) you will see the forms available on your team. you can then select the form that you will like to lookup data from. Any form you select for the Lookup action will have an ‘L’ tag attached to it on the Forms page to indicate that the form is being used as a source form. Hovering over the​ tag will display the lookup form which the form is sourced from.

5. Which of These Should Populate the Choice Field? - Here, you choose a field from your source form (form where data is being referenced from ) where the data will be chosen from. Clicking on this select box displays the list of the supported fields within the Source form and you can then select the preferred field that you want the data to be referenced from.

After you have selected the form, you will need to select the field in the form that triggers the lookup. This select box is only displayed after you have selected a source form.
Although the title of the select box displayed is dependent on the lookup type displayed. Once the respondent fills out this field, then the lookup is triggered.

6. Mapping - This is done after you have selected the field in the source form that should trigger the lookup action. Here, if you have selected the option to autocomplete a form with data from another form, then you attach fields in the source form whose data should autocomplete fields in the lookup form.

7. Specify Display Order - This section is only displayed when you have chosen the option to prepopulate a choice option with an option from another field. With this section, you can choose how you want your responses to be displayed. The two options in which data can be displayed is either in descending order (Z-A)  or in ascending order(A-Z).

You can lookup a document if it has been imported into your source form (the form with the  tag) navigate to the responses page and click on the import button {image} to import your responses.
The responses you have imported in your reference form will be populated in your lookup form as you have assigned.
Please see here to learn more about importing responses. 

Things to note

  • The lookup field is only available on the platinum and enterprise plan.

  • The lookup field by default is called Basic select when placed on the builder. This can be changed from the edit modal of the field.

  • Forms being used as source forms in lookup fields have an ‘L’ tag beside them to reflect that the form is being referenced by another form. On hover, the “L” tag displays the lookup form which the form is acting as a source form for.

  • Existing forms created before 15th March 2019 will not be able to reference previously submitted data to the form in a lookup field. To use a form with data submitted before 13th March 2019 as the source form in a lookup field, you will need to export the data then import it to the form or create a duplicate of the form, then import the exported data to the duplicated form which you will now use as the source form

  • For forms looking up data from another active form(form still receiving submissions), new submissions to the source form may take up to 30 minutes before they are available to be looked up. This means new data added to an active source form via submission may not be immediately reflected on the lookup form until about 30 minutes after the data is submitted. However, if the data is imported to the source form, the data is updated immediately. See this article for more information on how to import data to a form.

  • The lookup field can only be used by users who have the option to store their responses on Formplus enabled
  • For the Autofill lookup type, kindly note that the lookup field is case sensitive. See this article to learn more about the autofill lookup
  • Data cannot be looked up from another form when using a form in offline mode