Form Field Type

<< Click to Display Table of Contents >>

 >Collect > Collect Enterprise > Form Designer Page > Forms and Fields > Field Types and Attributes >

Form Field Type

The "Form" field type is designed to pull or filter data/information from other forms within the same form template and provide that data/information to the user on the mobile device in a dynamic drop-down selection list. This article details an example of a field designated as a form field.

 

Example Scenario

 

A project manager wishes to have a list of sampling locations be pre-populated into a separate "Locations" form in the template that the location-related field in a "Sampling" form will then access. This will allow the field crew to choose from among these pre-populated location codes on the sampling form.

 

The form template illustrated below is an example where the LowFlowSample form has a WellID field, which is a form field type, that references the Locations sub-form on the SPM_REF form.

Col-Template-Structure-Example

 

Setup

 

1.In a Form Template designed for sampling, create and setup a Locations form. This form will be populated with location data from EQuIS.

2.Add as many fields as desired to be pre-populated. Note which field is selected to be the form's Header (e.g., SYS_LOC_CODE).

Col-Field_FormType_Example4

3.Setup Pre-population on the form template with a user report that has the desired location data.

4.On another form (e.g., sampling form), add a field (e.g., Location ID) that will be a lookup list to these pre-populated locations.

Col-Field_FormType_Example1

5.Set the Field Type to Form.

6.Click Name Form and choose the Locations form from Step 1 as the target for a drop-down list.

7.Click OK.

Col-Field_FormType_Example2

The drop-down list in the Collect Mobile app will show a list of the Headers on those forms (e.g., SYS_LOC_CODE).

Col-Field_FormType_Example5

If desired, change the FormValue Attribute to use a different field from the target form to serve as the text on the items in the selection list.

Col-Field_FormType_Example3

 

Data Mapping

 

Form fields ultimately store a form ID (an autogenerated integer that is generally hidden) that matches the form chosen by the user. In the above example, the Form field will let the mobile user select the field and see a selection list of SYS_LOC_CODES. The user selects a SYS_LOC_CODE and the chosen SYS_LOC_CODE will appear in the app, but the data stored behind the scenes on this field will be an integer form ID. To ensure that the SYS_LOC_CODE is sent back to EQuIS instead of a form ID, set the field's Data Mapping as follows:

 

1.Edit the field form that contains the field that looks up to the "Location" form.

2.Click Data Mapping.

3.Setup a mapping to the format section's SYS_LOC_CODE field.

4.Click Value to set the logic for the value that should be stored.

5.Add a formula like the following:

GET(EQ([Location.#id],[LocationID]),[Location.sys_loc_code])

This formula uses the form ID number stored in the field to find the linked "Locations" form, then obtains the SYS_LOC_CODE value on that same form.

6.Save changes.