Dynamic selection values
We have already shown how to define static selection values ("allowed values")
The following describes how this can also be done dynamically with data profiles. You can use the same data profile that we have already described. It is only shown separately here for clarity.
We want to provide the field "order_number" of the form profile with selection values.
Settings of the data profile
All previously described settings for the data profile are identical. The only difference is the target structure.
Target structure of the data profile
The node containing the data must always be called " dataProvider" and must have value " 1" in node attribute " Maximum" . Below that, there are two possibilities to build the structure.
Possibility 1
In this variant, the attribute "Maximum" for node "order_number" must have the value "1".
The selection values generated in the data profile are assigned via a node with the same name as the field to be supplied in the form profile, in this case "order_number" (suffixes "#xxx" are ignored, so "order_number#2", for example, would also be a valid node name).
The field names under this node generate the actual values, which are in the end sent to the form profile by the form (here "1001" or "1002").
The field values generate the label names, i.e. the selection values you see in the form.
(→ see examples)
Possibility 2
In this variant, the attribute "Maximum" for node "order_number" should have the value " 99999" .
The selection values generated in the data profile are assigned via a node with the same name as the field to be supplied in the form profile, in this case "order_number" (suffixes "#xxx" are ignored, so "order_number#2", for example, would also be a valid node name).
The actual values that are in the end sent to the form profile by the form ("1001" or "1002" in the example linked below), are specified as values in a field "value" (exactly like this).
The label names, i.e. the selection values that you see in the form, are given as values in a field "label" (exactly like this).
The "Path" attribute of the node (here "order_number") can be used to control the number of values to be generated.
(→ see examples)
Integrating data profile in form profile
The integration of the data profile is done exactly the same way as already shown.
In addition, the affected field in the source structure of the form profile (here "order_number") must have the value "*" in attribute "Allowed values".
(→ see examples)