Just to be clear, you are able to successfully submit data with this form, but you are getting this error when trying to subsequently edit (one?) of the submissions, correct?
Are you able to edit any other submissions? or do all attempts to edit anything give you this error?
[FWIW I was able to successfully both submit and edit a submission with your form, although obviously my choice of data input was completely arbitrary and made up]
I do note that the question being flagged in the error popup above is nested in a repeat within a repeat within a repeat (!); so perhaps this triple-nesting is causing an issue
Hi @Xiphware. Thanks for taking the time to take a look into the form.
Yes, this is the issue, although sometimes I’m unable even to submit the data at all (the form keeps trying to submit in an endless loop)
So far, I’ve found the error occurs when trying to evaluate question _5_17 in group_tEspecie (lines 59, 60, 65, 70, 71, 73) and yes, this group would be the third nested group.
Because this is a nested repeat, you will probably need to expand this to cover all 3 levels of nested-repeat (!). From Form Operators and Functions - ODK Docs :
indexed-repeat(name, group, i [, sub_grp, sub_i [, sub_sub_grp, sub_sub_i ]])
Returns the response value of question name from the repeat-group group, in iteration i.
Nested repeat groups can be accessed using the sub and sub_sub parameters.
This is getting pretty esoteric, so you might have to fiddle around to get the correct parameter syntax. But there may be some useful examples here.
I’ve noticed that this nested group does not allow any relevant conditions. Initially, I thought the problem was due to referencing question outside the group, which would require precise indexed-repeat syntax, as suggested, but it seems like it’s not allowing to add any relevant conditions. but just some calculations.
I also reviewed this post from @Josh and tried changing the operators in the conditions with no results.
Additionally, I came across previous issues regarding nested repeat-groups here:
So, is this an unresolved issue?
However, I will give the proper indexed-repeat syntax another try.
On the other hand, I’ve managed to avoid the error by making the following changes:
Previous xlsform (with errors when trying to edit some submitted forms)
In yellow. Removed all relevant conditions. As previously mentioned, the error remains with any type of relevant (not just those referencing questions outside the group)
In green: Modified the calculation formula to avoid referencing questions outside the group.
In blue: avoided referencing ${_edad_especie} in line 73. Otherwise I keep getting the same error:
Trying to manage this one, I thought I could be related to the calculation formula, so I changed it to check if that was the problem
The conclusion is that the error persists when referencing ${_edad_especie} in line 73, regardless of the calculation formula.
Funny thing: lines 68 and 69 are doing the exact same thing, that is, performing a calculation and then printing the result in a label, but those lines are not causing any trouble so far.
I assume you are seeing this odd behavior (only?) with Enketo web client? I’d be curious if similar consistent behavior is observed with the KoboCollect/ODK Collect Android client; they use a completely different XForm/XPath evaluation engine, so I suspect not.