I am designing a form for collection data in agriculture. I am looking for
a way to avoid duplicate entry in my form. my form has a integer variable
"Plot_Num" to store the number of the plot for a farmer, and four
additional select one variable "Crop1", "Crop2","Crop3"and "Crop4" to store
the crops. I don't want to allow any crop to be selected twice. For
example it a crop "Maize" have been selected in one field, the form should
not allow again to select the crop "Maize" again.
You have two options, constraints or choice_filter.
If you use constraints, for Crop2, you would have ${crop2} !=
${crop1}. The form would alert and stop the user from continuing. http://xlsform.org/#constraints
If you use choice_filter, you'll have a select of all the options,
then each following question would hide the previously selected
option. I like this method the best and I've attached an example. It
works for select_ones and select_multiples.
···
On Thu, Feb 16, 2017 at 11:55 PM, Bigirimana Florent wrote:
> Hi,
>
> I am designing a form for collection data in agriculture. I am looking for a
> way to avoid duplicate entry in my form. my form has a integer variable
> "Plot_Num" to store the number of the plot for a farmer, and four additional
> select one variable "Crop1", "Crop2","Crop3"and "Crop4" to store the crops.
> I don't want to allow any crop to be selected twice. For example it a crop
> "Maize" have been selected in one field, the form should not allow again to
> select the crop "Maize" again.
>
> Any help ?
>
> Best
>
> --
> --
> Post: opendatakit@googlegroups.com
> Unsubscribe: opendatakit+unsubscribe@googlegroups.com
> Options: http://groups.google.com/group/opendatakit?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ODK Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to opendatakit+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Tanks a lot, I used option one, it is simple and working fine.
Tanks
···
On 21 February 2017 at 02:52, Yaw Anokwa wrote:
You have two options, constraints or choice_filter.
If you use constraints, for Crop2, you would have ${crop2} !=
${crop1}. The form would alert and stop the user from continuing. http://xlsform.org/#constraints
If you use choice_filter, you'll have a select of all the options,
then each following question would hide the previously selected
option. I like this method the best and I've attached an example. It
works for select_ones and select_multiples.
I am designing a form for collection data in agriculture. I am looking
for a
way to avoid duplicate entry in my form. my form has a integer variable
"Plot_Num" to store the number of the plot for a farmer, and four
additional
select one variable "Crop1", "Crop2","Crop3"and "Crop4" to store the
crops.
I don't want to allow any crop to be selected twice. For example it a
crop
"Maize" have been selected in one field, the form should not allow again
to
select the crop "Maize" again.