iefieldkit icon indicating copy to clipboard operation
iefieldkit copied to clipboard

ietestform : test that all fields in a repeat group are referenced by the indexed-repeat() function

Open kbjarkefur opened this issue 6 years ago • 3 comments

Based on feedback from @aurelieri. Here is summary of what she said:

For ex: You have a repeat group with questions you loop over multiple plots. Let's say you have one question called d1 where you ask "Is this plot dry?" Later, outside of the the loop, you want to ask a question, lets call it q1, only if at least one of the plots were said to be dry. When uploading the form, SCTO would allow you to simple put "${d1}=1" in the relevance for q1, however, once you get to that place in the survey, you get an error saying that d1 is in a repeat group and you must use the indexed-repeat() function. Since you do not catch these errors when uploading the form, this could case a disaster once you are in the field.

This is a very good suggestion. While definitely possible, it might be a bit difficult to implement. We will probably not be able to do it before the first version of this command, but we will start thinking of a way to do this.

kbjarkefur avatar Jan 10 '19 18:01 kbjarkefur

@aurelieri, is this only formulas in the relevance column? I guess this also applies to calculate column, condition column and filter column.

kbjarkefur avatar Jan 10 '19 18:01 kbjarkefur

Yes, it could apply anywhere you use ${d1} outside of the loop. Even in a label for a note field or a question. And the problem is that you know you did the mistake once you reach that field while filling up the questionnaire on your device. There are no error message when you upload. For long surveys, it is complicated to check the consistency. It would be so great to add this check in the ietestform. But I understand it is quite complicated for now

AurelieRi avatar Jan 11 '19 14:01 AurelieRi

Ok, so this could be in either of these fields:

  • label columns
  • label columns (choice sheet)
  • relevance column
  • calculate column
  • condition column
  • filter column

I have an idea for how to do this in all fields in the survey sheet, but it will be complex for us to have time to test properly for the first version. How to include the choice sheet label columns will depend on how we pass information between sheets (see #42 for more discussions on that).

kbjarkefur avatar Jan 15 '19 17:01 kbjarkefur