I have this form to build. I want the choice list of teachers to be populated in either Part 1 or Part 2. Instead of the Selecting the teachers one by one. Some will not select the required number of teachers so that they complete the data collection fast. And so I want the teacher in each school to be pre-populated in a note and data on each completed.
Monthly Report Simplified.xlsx (208.6 KB)
@solotheking, maybe you will also need to provide details for your issue so that the community can understand your requirement.
This is my request. I want the names of teachers in a particular school to be brought into the questionnaire so the respondent complete data on each teacher instead of select_one teacher. at a time
Or state the number of teachers and each teacher is preloaded in note in the repeat_count option instead of select_one teacher at a time in cascade select option.
This would prevent respondents from completing data on less than the number of teachers in a school.
Is there a way to get this done?
You might also think about using a select_multiple teacher-list, with school as choice_filter, read_only and all selected…
The repeat ( with repeat_count = count-selected(…) ) could then reference a teacher with selected-at(…) function corresponding to position).
Another option might be to use control select_one and control the total (count(…) function after end_repeat) with the teacher_number for the school (e.g. based on pulldata from a school - teacher number mapping choice_list).
- Is there a possibility to “read” a choice_list, e.g. into a text variable? (E.g. as space separated string of all choice names.)
- Can even a choice_filter be used hereby?
- And how can we get the number of choices in a choice_list?
I’m very much interested in this. But could you do it on my xls document for me, please?
Monthly Report Simplified.xlsx (208.6 KB)
Sorry, no, too much work and I am afraid it is not the task of this forum to develop complex individual forms.
Ok sir, but I hope I could get a picture or a sample to guide me as to what to put where, please.
Try playing around with this:
show-choices.xls (19.5 KB)
Basically, the ‘trick’ is to use some XForm black-magic, in the form of a true()
choice-filter which forces the option list into an XForm nodeset, and then a join()
to extract the labels from this nodeset into a string (I’m using a ', ’ separator above, but you can substitute a single space if you prefer).
Hi @Xiphware,
Thanks a lot! Great.
Kind regards
I’ve no problem with the 1st paragraph but how do I do “The repeat (with repeat_count = count-selected(…) ) could then reference a teacher with selected-at(…) function corresponding to position).”
And then the “Another option …”
I have the feeling that this would help me solve my problem, kindly help out or any help to be provided by @Kal_Lam @yanokwa. or any of the vociferous administrators is highly welcomed.
@solotheking, are you trying to refer to this post that has been discussed previously?
Hey it is in xls file.