Indexed-repeat repeat group

** 1. What is the problem? Be very detailed. **

I can't use the relevant function because the index-repeat fails

** 2. What application or server are you using and on what device and operating system? Include version numbers. **

ODK Central 0.7
Android 7 - Motorola G7

** 3. What have you tried to solve the problem? **

Declare the variable before executing the repeat but it did not work.

** 4. What steps can we take to reproduce the problem? **

The error occurs when I want to use the relevant function in a field. Example: f18 fm_pregnant, I must enable this question if it is female sex and under 10 years old. Placing the relevant filter gives me an error.

** 5. Anything else we should know or have? If you have a test form or screenshots or records, attach below. **
test.xlsx (9.4 KB)

The error occurs when I go to the modules. I need to take members variables, age, gender. Then use these variables as relevant or constraint for question validations. That's where I get the error.

Can someone help me please?

any suggestions? some help? I'm stuck and I need to make this work. I am grateful if anyone could help me. Thank you

According to the error message returned after converting:

The problem was located in Relevant expression for ${fm_pregnant}

in that row (18) you have ${gender} = 'F' where you refer ${gender} from another repeat_group. That means you need to use indexed-repeat like you do in calculations for example.

2 Likes

Exactly, I need to use the member data to validate questions that I will then ask in modules one, two, three etc. How to be gender and age. But I can't find a way to declare the variable so that it doesn't fail. Any suggestions?

You just need to the same what you did with indexed-repeat..., ok here is your updated form, I highlighted in red what I added. Please test it.
index.xlsx (8.1 KB)

3 Likes

hi @Grzesiek2010
Thank you very much for your help. I didn't realize to declare the complete variable as index-repeate. You always learn something new or you can ignore it. Thanks again for your time and help!

1 Like