Project user input variable

A project user input variable value is populated by the app user, and you can apply it to one or more buttons in a project. The app user enters the value; however, the project author must define the buttons and fields to which the variable will apply.

The following apply to a project user input variable:

  • Up to three project user input variables can be defined per project.
  • Its value is entered by the user before pressing a button. If the user input is set as required, the user is prompted to enter this value when starting the project but can edit the value at any time.
  • You can apply its value to any text fields in any buttons.
  • You can apply its value to a text or integer field that is configured with a coded value domain.
  • You cannot apply its value to a text field that is configured with a range domain.

Properties of the project user input variable are as follows:

  • Label—Text that will appear as the title of the project user input page in the app.
  • Input type—Can be single-line or multiline text or a choice list. For choice lists, you define the values and can allow free text entry. Use a dynamic choice list to populate values from fields in a query layer or table that you add to the project.
  • Apply hint—Display hint text on the project user input page in the app.
  • Apply an input mask—Define the format for data entry by using characters and symbols to define an input mask.
  • Show barcode scanner—Use the barcode scanner on the input dialog box for text field entry.
    Note:

    The following formats are supported: QR CODE, UPC A, UPC E, EAN 8, EAN 13, CODE 39, and CODE 128.

  • Required—Specifies whether the mobile app user must provide the user input value before they can press any button. When not required, the user can optionally enter a user input value by selecting the edit button (next to the user input value displayed at the top of the screen) and typing a value.
    Note:

    When applying a user input value to a feature layer with required fields, ensure that its required property is set to true to avoid submission errors.

A project user input variable is created and configured by the project author either on the Data tab for each field or in the Project user input menu item.

To assign a project user input variable to a capture field of a button, on the Data tab, from the drop-down menu of the capture field, choose Project user input.

Choose a project user input for a text field.

In the mobile app, the user is prevented from entering text that exceeds the length of the data field.

Dynamic choice lists

A project user input can be populated with a dynamic choice list by associating it with an existing feature layer or table. The content of the list can be controlled by the author by configuring properties of the list.

To use a dynamic choice list, add a query layer or table to the project by clicking Manage project layers Manage project layers. On the Query tab of the Layers panel, click Add to find and select one or more layers or tables.

Note:

Read-only feature layers and tables can be used to populate a dynamic choice list.

Properties of a dynamic choice list are as follows:

  • Display field—The value that is displayed in the mobile app.
  • Value field—The value that is stored in the layer.
  • Sort field—The field used to sort the dynamic choice list.
  • Sort order—Ascending or descending.
  • Update mode—Manual or automatic. When manual, if the user input is set as required, the list is updated when the project is opened the first time only. Subsequent updates will only occur when the user drags down the list. When automatic, if the user input is set as required, the list is updated when the project is opened or when the user input is edited.
  • Filter—Query used to limit the values displayed in the dynamic choice list. When constructing the conditions for the WHERE clause, you can use the options to select a device variable (username, fullName, firstName, lastName, or email) or a field from the selected layer. For example, assuming that the canvasser field in the selected layer contains usernames, to filter the list to values that only match the username of the canvasser currently signed in to the app, enter the expression Canvasser='${username}'.

    A condition expression for a WHERE clause that filters the dynamic choice list

The mobile app will only return the first page of results for a list, which by default for an ArcGIS Online feature service is 2,000 records.

A dynamic choice list is available for offline use after it has been viewed once in the mobile app. To get updates to the list, the device must be online when the list is reloaded.


In this topic
  1. Dynamic choice lists