Hi Team, I have a list of 10 crops displayed in a select_one. I want to set
a loop (repeat) of 5 times each time allowing a user to pick only one crop
up to five crops.
How can I set a a validation such that a crop selected in the 1st loop
cannot be selected in the 2nd or subsequent loops. I prefer an error
message to warn that the selected had been picked prior.
For things like this, where you have a specific upper bound to the number
of crops (or any other choices) that might be selected, it is best to
"unroll" the loop.
So that you have a flat form with NO repeat groups:
--screen-1--------------------
Select the crops for which you will provide answers, with crop #1 being the
largest cultivated hectares, and crop #5 being the smallest:
--screen-2-------------------
Note "You have given the following cultivated hectare ranking for your
crops: <crop#1> ... <crop#5>"
Acknowledge: The crops are listed in the correct order based upon
cultivated hectare (OK)
^--- place the constraint on the crop#1... crop#5 values not being
duplicated on this
Acknowledge widget AND that the user has acknowledged the ordering as
correct.
and have a custom constraint message saying to use the back button to
correct the ordering before continuing.
question(s) for crop #1
question(s) for crop #2
....
question(s) for crop #5
ยทยทยท
-------------------------------------------------
This allows you to enforce some sort of ordering on the crops entered
(e.g., by cultivated hectares), have the user confirm
this, and then have a flat data record where the first block of responses
(for crop #1) have more importance than the 2nd,
etc.
Hi Team, I have a list of 10 crops displayed in a select_one. I want to
set a loop (repeat) of 5 times each time allowing a user to pick only one
crop up to five crops.
How can I set a a validation such that a crop selected in the 1st loop
cannot be selected in the 2nd or subsequent loops. I prefer an error
message to warn that the selected had been picked prior.