Skip loop of group

Hiii,

I am preparing a form where drop down are 1,2,3,4
And if I select 1 then rest can skip only group 1 can be display, if selected 2 then display 1&2 groups like wise if selected 4 then all 1 to 4 groups displayed.

Seeking help.

Hello,
You may use relevant per group with or combinations. For example for group 2 relevant is: ${FilterVar}, = ‘2’ or ${FilterVar} = ‘3’ or ${FilterVar} = ‘4’

Another option would be casting the choice to integer and using numberic range
For ex. for group 2 relevant is:
number(${FilterVar}) >= 2

1 Like

Thanks for the reply, will try and update you

@dantd, this is what @wroos has advised. Thank you @wroos! Documenting the same so that it could be helpful for the community.

In the survey tab of your xlsform:

Data entry screen as seen in Enketo: when you have to view only 1 group

Data entry screen as seen in Enketo: when you have to view 2 groups

Data entry screen as seen in Enketo: when you have to view 3 groups

Data entry screen as seen in Enketo: when you have to view all 4 groups

Reference xlsorm:

Skipping Groups.xlsx (10.1 KB)


There is also an alternative approach that has been discussed previously:

2 Likes

@Kal_Lam, thanks a lot.