The ChooseFromRepeatingData Command
ChooseFromRepeatingData. This command will present a drop-down list of values in the interview. This is similar to the action of the ChooseFromList command except that the values to be displayed are not provided at template authoring time, but are contained in the data set which exists at the time the drop-down arrow is pressed.
For example, suppose a number of parties have been captured, and one of those parties is to be chosen as the signatory. The following command would achieve this:
Another example: suppose not the name but the ID Number of the signatory is needed, and this is to be chosen using the ChooseFromRepeatingData command. The user must be presented with a list of the parties’ names, but the data element to be set is the ID Number. The following command would be used, introducing a third parameter, being the name of the repeating data element whose value should show in the drop down:
With effect from version 5.1.1, a parameter AddAllChosenData can be included, as follows:
This has the effect that, in addition to the IdNumber of the chosen Parties repeater being added to the data set, ALL of the sub-elements of the relevant Parties repeater are added to the data set, at the level in the data of the IdNumberOfSignatory data element. This makes it very easy to refer to those other sub-elements, rather than, as in the past, having to refer to them via XPATH predicates.
The ChooseFromDataElements command can be used to populate a drop-down with data from the data set where the source data is not from a repeating set.
The command ChooseFromRepeatingData is exactly the same as ChooseFromData and was introduced to make the distinction between it and ChooseFromDataElements more obvious.