Questions in repeat group not showing with position(..) calculation

Hello everyone,

I’m having an issue where the questions within my repeat group are not displaying, and I suspect it’s related to a calculate question that uses position(..).

My goal: I want to use a calculate question to get the current repeat index using position(..), and then display that number in a subsequent question within the same repeat group.

The problem: The entire repeat group, including the questions inside, is not showing up in the form.

Here is a part of my XLSForm:

Column 1 Column 2 Column 3 Column 4 E
type name label calculation relevant
select_one StudyN-option StudyN
note Part2Note Part2
begin repeat Part2 true()
calculate current_study_index position(..)
end repeat Part2

I have already checked the following based on previous advice:

  1. The calculate question is placed directly inside the begin repeat and end repeat block.

  2. The calculation column for the calculate question is set to position(..).

  3. The relevant column for the begin repeat is set to true().

Despite these corrections, the Part2 group still does not appear in the form.

Could there be another reason for this issue? Any help would be greatly appreciated.

Thank you!

There is nothing to show in the user interface as there is only a calculate type variable in your repeat group. You may add a note for ex. to see the difference.

Please, also always check your form during development and before deployment with the Online validator.

1 Like

form_updated.xlsx (9.2 KB)

i have update the form as instructed by @wroos on the above post

1 Like

Hello pruzige,

Thank you for your reply.

I’m still having an issue with my repeat group not showing up when I try to set the repeat_count based on a select_one question.

The repeat group works correctly if I manually enter a fixed number (e.g., 3) in the repeat_count column. This indicates that my begin repeat and relevant Logic is correct.

However, when I try to use a variable from a select_one question, the repeat group disappears.

My goal: To make the repeat group appear based on the number selected in a select_one question.

Here is the relevant part of my XLSForm:

surveyシート:

type name label repeat_count
select_one number_options study_count Select number
begin repeat my_repeat_group ${study_count}
end repeat my_repeat_group

choicesシート:

list_name name label
number_options 1 1 time
number_options 2 2 times
number_options 3 3 times

The problem: When I select an option (e.g., “3 times”), the repeat group does not show up.

Could there be an issue with how I’m referencing the select_one question? Or is there something else I’m missing?

Thank you for your help!

Thank you for your reply, wroos!

I fix some error by that tool.

But I can not solve my problem now.

The repeat group works correctly if I manually enter a fixed number (e.g., 3) in the repeat_count column. This indicates that my begin repeat and relevant logic is correct.

However, when I try to use a variable from a select_one question, the repeat group disappears.

form_updated (1).xlsx (10.3 KB)
Tested. I hope this solves the problem



1 Like

Dear pruzige,

My form work is complete now.

Thank you so much!

1 Like