Repeat with condition like 'Yes/No' , for XLSForm

Hi all,
I am a new and beginner on ODK and want to create a survey form for my NGO, and I finally make server side working. (Apache / Tomcat / ODK on a notebook and working fine now)

The next step is working on creating form which I can only use XLSForm for create and some success on simple data collection, and going next step for advance and simplify the work flow.

In the form I want to create a condition which "Yes/ No" and if Yes, repeat a group of question (Add group, in Android)

However I can't make it well, I have search and got hints statement as below (from an old post:!topic/opendatakit/u-FEYCGURSM )

Make group repeat (begin_repeat) relevant based on Yes/No Response i.e. ${Yes/No}='Yes'. This will make The grouped repeat questions appear if previous response is Yes.

How I transform above into Excel ?

ODK Aggregate v1.4.15, XLSForm 1.4.7, Android 7 with ODK Collector 1.12.2

I can't upload file so I try to describe here:

type, name, label, relevant, repeat_count
select_one yesno, dis, Any Disturbance
begin_group, group_d1, Group D1, , $(dis)= 'Yes'

ODK Validate V1.7.0 show error:
Invalud calculate for the bind attached to "/pccn_case_ph_v4/repeat_count" : couldn't understand the expression starting at this point: ?$(dis).... in expression $(dis) = 'Yes'

I try to put the expression to relevant roll but still fail.

Sorry for my stupid but I already refer to online tutorial but most of them about XML and I can't read them well.
Appreciate if anyone can direct me to anywhere have a real case so I can easier understand ?

Thank you very much!

Hi @kentchan4

I'm not sure if I understand your need well but I guess this is what you need:
repeatRelevant.xml (1.5 KB)
repeatRelevant.xlsx (6.6 KB)

Let me know if it satisfied you.


1 Like

And you can find more info about creating forms using xls here


Sorry for late and really appreciate your help!!! I can make it now!

Yes I have take as reference but I guess I was missed put "repeat" in appearance... I need to study hard on it !!!

Thanks again!


2 posts were split to a new topic: Limit number of repeats