I am quite new to xlsform and I want to know how to use "if" statement
within relevant. Let assume that that I have a select one variable
"Crop_system" with choices 1: Pure and 2: Mixed. I have another integer
variable "Crop_Num" and I want to populate the field with the number of
crops within a plot. I want to limit the number of crops to 1 if for
"Crop_system" variable the selected choice is "1" and set the maximum
number of crops to 8 if the "Crop_system" is "2"
Hi, Florent.
Try the xlsForm in attach.
If eventually, your goal is to set at 1 and 8 respectively crop_num, we
won't need crop_num1 and crop_num2 fields, and then, the calculation would
be if(selected(${crop_system},'1'),1,8).
Hope that will help.
Best,
Note(to all):
Any most fast way to do this will be welcome and well appreciated.
In advance, thanks.
···
Le mardi 14 février 2017 15:23:49 UTC+1, Bigirimana Florent a écrit :
>
> Hi
>
> I am quite new to xlsform and I want to know how to use "if" statement
> within relevant. Let assume that that I have a select one variable
> "Crop_system" with choices 1: Pure and 2: Mixed. I have another integer
> variable "Crop_Num" and I want to populate the field with the number of
> crops within a plot. I want to limit the number of crops to 1 if for
> "Crop_system" variable the selected choice is "1" and set the maximum
> number of crops to 8 if the "Crop_system" is "2"
>
> Any help is highly appreciated
>
>
Hi, Florent.
Try the xlsForm in attach.
If eventually, your goal is to set at 1 and 8 respectively crop_num, we
won't need crop_num1 and crop_num2 fields, and then, the calculation would
be if(selected(${crop_system},'1'),1,8).
Hope that will help.
Best,
Note(to all):
Any most fast way to do this will be welcome and well appreciated.
In advance, thanks.
Le mardi 14 février 2017 15:23:49 UTC+1, Bigirimana Florent a écrit :
Hi
I am quite new to xlsform and I want to know how to use "if" statement
within relevant. Let assume that that I have a select one variable
"Crop_system" with choices 1: Pure and 2: Mixed. I have another integer
variable "Crop_Num" and I want to populate the field with the number of
crops within a plot. I want to limit the number of crops to 1 if for
"Crop_system" variable the selected choice is "1" and set the maximum
number of crops to 8 if the "Crop_system" is "2"