There are three types of advanced field types available to you:
- Location fields
- Barcode fields
- Calculated Value fields
Note: This article covers the Advanced field types. For a full list of available field types, see here. To see what the below fields will look like to the fieldworker on their handset, make use of the 'Preview' button on the far right in your top toolbar.
You can use this field to capture a geographic point using GPS or map input. The fieldworker will be able to choose whether to capture their current location if available (1), or to select their location from a map (2). The longitude and latitude GPS coordinates will be saved in each case (if possible) (3). You cannot set a default value for this field type.
Note: if the form is used in areas of low connectivity, it is recommended to set this field as 'optional'. If the field is required and the handset struggles to capture the GPS location because of poor connectivity, the fieldworker might get stuck and will not be able to continue with the form.
This field is used to capture barcodes and QR codes into your form.
Note: The Gateway app does not have a built-in barcode scanner, so if your fieldworkers are using a handset to scan a barcode/QR code, they will need to download an external scanning application. We recommend the free Barcode Scanner app available in the Google Play Store, but there are many similar apps that can also be used.
When conducting the form, the fieldworker will have the choice to either manually entering the code directly into the text box (1) or tapping on the icon (2) to launch the external scanning application, allowing them to scan the barcode or QR code. After scanning the barcode/QR code, the text box will be populated by the code that was scanned in. You can view the barcode/QR that was captured in the Analytics grid once the form is submitted.
Calculated Value field
This field is used to calculate and store data (typically to use in another calculation or other logic) and is not displayed to the fieldworker.
Values can be stored as one of the following data types which will determine how the data will be handled in analytics:
You can use a static value or one of the many built-in functions by typing '='. You can also reference another field in you form by typing '$'. Use a combination of any or all these to create the expression that you require.
Calculated Value fields can also be used as source fields for skip logic. No default value can be set for this field type.
Note: When using calculations, ensure that you use brackets and/or spaces correctly so that it is clear what parts of the expression belong together. E.g. if you want to subtract 1 from a certain number field, the expression =(($Number_field_1)-1) and =($Number_field_1 -1) works as expected but not =($Number_field_1-1).
Example: calculate a participant's BMI
- Add Number fields to capture the participant's height and weight respectively.
- Add a Calculated Value field to calculate the participant's BMI using the responses to the two Number fields added above and the formula BMI = weight (kg) /
- If you want to show the value of the BMI calculation to the fieldworker, add another field (e.g. an Information field) and reference the Calculated Value field name. In this case, the "round" function was used to round the answer to one decimal place.
- On the fieldworker's handset, it will look as follows.
Note: If nothing was calculated (e.g. the field(s) on which the calculation are based was skipped), "NaN" (Not a Number) will be shown instead of a number.
- The calculated value can also be used as a source field to base skip logic on. For example, certain fields should only be asked if the participant's BMI is equal to or greater than 23. This field will be skipped if the value for BMI as calculated above is less than 23.
Using the legacy form designer? Have a look at our article on Field Types in the legacy form designer.