Dear All,
I have completed this idea into a project https://wiki.commcarehq.org/display/commcarepublic/Using+Repeat+Groups+in+the+Form+Builder
But it brings all the options from the Lookup Table when the questions are repeated, but I want to repeat the questions when choosing the option from the Lookup Table (as in the image)
When I chose "Flopsy" in the Lookup Table the repeat group give me a repetitive value in the name of "Flopsy" in the hidden question "bunny"
For note, I make "bunnies" in Lookup Table
Best regards,
Ahmed
You copied what was in the tutoriel, but the exemple in the tutoriel does not act as you want it...
Your repeat count is counting the number of bunnies insid your lookup table. You need to count the number of bunnies you have selected.
You need to change the bunny hidden value inside your repeat group to link to your multiple choice question instead of the lookup table.
The second option is the one valid. The calculation has to be in the calculate condition field.
But the bug lies elsewhere : inside the repeat group, for the calculation of the bunny hidden value, try putting some spaces after 'position' like that :
it is Working thank you a lot.
I appreciation for your follow-up
But, when I back to select and I cancel one choice from (bunnies) it gives me an error as in the Image in below.
in fact, I trayed to do some change in repeat group as in the CommCare tutorial as this [Remove repeat Group] (Using Repeat Groups in the Form Builder - CommCare Public - CommCare Public)
but it didn't work as in the image
#form/counter + 1
Can I ask you for help by adding another selection (like "items" ) and combining it with the first option (bunnies) to be repeated during repetition in Repeat Group?
I tried but it didn't work I put: selected-at(#form/bunnies, current()/../position - 1) or selected-at(#form/items, current()/../position - 1)
Please find my example:
Form Builder clip version 1
id type labelItext:en-default appearance calculateAttr rawDataAttributes rawRepeatAttributes repeat_count
/repeat_count DataBindOnly null null #form/items_collect + #form/bunnies_collect null null null
/items_collect DataBindOnly null null count-selected(#form/items) null null null
/bunnies_collect DataBindOnly null null count-selected(#form/bunnies) null null null
/copy-1-of-repeat_count Trigger "<output value=""#form/repeat_count"" />