System paramaters, accessing user input inside the form

What you'll be learning:

  • how to use system parameters (values related to the current form fill session) for data binding

  • how to use some advanced query statements

  • how to use hidden labels as helper variables in a form

You now have a form that asks the drivers about whether various car parts are in order or not, and every detail is data-bound to a reference table. What you still need is to let the driver select the particular truck that he or she will be inspecting.

You don't want to let the driver select a truck that is not assigned to him or her in the database, so you'll want to filter the reference data by the current user of the form. For this, you'll have to access the so-called system parameters: the values, such as the current date or the locale settings of the user's mobile device, that correspond to the current form fill session.

You also don't want to allow the driver to select more than one truck, so you'll have to find a way to make the form count the number of selected elements.

This is what you'll be making in this section - the user's name is displayed at the top, and the user cannot submit the form if more than one truck is selected

Figure 87. This is what you'll be making in this section - the user's name is displayed at the top, and the user cannot submit the form if more than one truck is selected