Collect Formula Building – Section Fields

<< Click to Display Table of Contents >>

Navigation:  Collect > Collect Enterprise > Template Designer Page > Formula Builder >

Collect Formula Building – Section Fields

Section Fields are general, universal field values available for all fields on the form. Different forms will have different section fields but section fields are available for all forms in the template. Section fields generally start with the ‘#’ sign.




The following table describes each section field and some examples of how these fields can be used in Collect.




Example Use


Integer value automatically assigned to each unique form record.

Used with the GET() function to find or work with data from other forms.


Parent ID value associated with each child row.

Same as above example.


Related to Data Sets in
Collect form templates.

See Data Sets for more information.






Latitude captured at the creation of the form record.

Obtain coordinates to be used in downloading weather information via a Service Field.


Longitude captured at the creation of the form record.


Device that was used to capture the form record.


Name and version of the operating system


Current date/time at the creation of the form record.

Autofill observation date/time.


Username used to login to the server.

If username is the user’s email address, autofill user’s email address on the form.


Version number of the Collect Mobile application being used to capture data.


Form name in which the field is listed.

Identifies which form (subform) the field is in.


When form records are created via pre-population, the section fields initially will be populated with data that match conditions on the Enterprise server at the time the form was planned. After any edit is made to the form, the fields will reset to values that match conditions in Collect Mobile.


Additional Examples


#ID and the “Form” Field Type


"Form Lookup" fields are designed to pull or filter information from other forms within the same form template. In this example, there is a "Location ID" field in a "Sampling" form to show a list of location IDs coming from a set of pre-populated "Location" forms within the same template. The end user of Collect would select a location ID from the list, but the value set behind the scenes is the #ID value for the location ID they chose. This integer #ID is likely not the real location code value that is intended to map to a sample’s location code (e.g., SYS_LOC_CODE). Use a GET() function in the Data Mapping for this field to acquire the location code instead, such as:

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


This formula finds the "Location" form whose #ID matches the value set in the current form’s "Location ID" field, and then returns the matching SYS_LOC_CODE from that record.



Get Mobile User's Username on Pre-populated Forms


The #STAMP_USER field gets populated with the username of the Enterprise user planning the form if that form is pre-populated. This value changes to the mobile user's username once they open the form in Collect Mobile and make any changes to the form. To have a field default to the mobile user's username, include some logic on the Default attribute that will make it wait until some action is first taken on the form in Collect. An example is to wait until a field that does not receive any pre-populated values is found to be not empty, like the following formula:



When the Date field on the form is edited, the #STAMP_USER value will switch to the mobile user's username and then the Default attribute places this value in the field of interest.