Defining selection values, mandatory fields and default values
Allowed selection values and mandatory fields
Remember our previous example. We had entered the item numbers manually. But you can already define values for fields in the profile in field attribute "Allowed values" (separated by semicolons), which you can then select from a list in the form . Note: If values are specified this way, you cannot manually enter a value in the form, but only select it from the list. Note: You can use a regular expression regex:xxx to check allowed values (but this does not create a selection list) .
Let's also use this opportunity to make the order number a mandatory field by setting the source structure field attribute " Minimum" of field " order_number" to " 1" . We then do the same for field " item_number" . The attribute " Maximum" has no effect on fields.
In the form it will look like this.
If you insert an " items" row, you must enter an " item_number" , otherwise an error will occur. But there will be no error if you do not insert an " items" row at all. If you want an order without items to cause an error , you must also set the " Minimum" attribute of the " items" node to " 1" .
Default value
It is also possible to give a field a default value with field attribute "Default value".
In the form it will look like this.
Example profile
To save you the work and for verification, here is the described profile to import. After importing the profile, do not forget to set it active. Also, you need to create your own Web Monitor user, if you haven't already, and select it (or the role it has) in phase 1.