You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(if necessary) Fill the child-only registration without age const form and enter "Tom" in name field, send the form and refresh the list of blank forms.
Fill child update filter name form and save it as draft.
Go to "Drafts” and open the form (there's a mismatch error).
The text was updated successfully, but these errors were encountered:
There's a calculation of instance('children')/root/item[age< 18] on the child select. I think the intent was to put age < 18 in the choice_filter column and that's it.
There are a couple of form design issues here:
Having a calculation on a user-modifiable field is generally not going to be a good idea because it will reset any value that the user selects. This is something we've considered warning about from pyxform but haven't done yet.
instance('children')/root/item[age< 18] can potentially give back multiple values if there are multiple children with an age less than 18. It's not possible to store multiple values in a single field.
That second issue is what the error ends up being about. It's basically saying 'child' is a field and you're trying to store multiple items here but you can't. You could do something like join(', ', instance('children')/root/item[age< 18]) but you can't just store the result of requesting all items with age less than 18 if there is more than one match. In this case, the indexed-repeat suggestion is nonsense, which relates to getodk/javarosa#700
ODK Collect version
the master version 66e9c1f
Android version
10, 14
Device used
Redmi 9T, Pixel 7a
Problem description
While creating forms with entities and choice filters I noticed a mismatch error suggesting to use indexed-repeat().
Steps to reproduce the problem
Example 1:
child updateCOnst.xlsx.txt
child_only_registration_without_age_limit.xlsx.txt
Start with the dataset without children- no entities with property age < 18 (if necessary delete entities on Central).
https://staging.getodk.cloud/#/projects/101/app-users
Download the user "children” to Collect.
Fill the child-only registration without age const form and enter age < 18 and send the form.
Refresh the list of blank forms.
Go to child update with const filter form.
Select the created child, fill the form and save as draft.
Go to "Drafts” and open the form.
From the hierarchy view go to the first question (selected child is deselected).
Discard the changes and go back to the main menu.
Go to "Start new form”, fill the child-only registration without age const form and enter age < 18 and send the form.
Refresh the list of blank forms.
Select the second created child, fill the form and save as draft.
Go to "Drafts” and open the form (there’s a mismatch error).
Go back to "Drafts” and open the first draft that was created (there’s a mismatch error).
Other information: The mismatch error also appears when the user opens a finalized form.
Example 2:
child update filter name.xml.txt
child update filter name.xlsx.txt
https://staging.getodk.cloud/#/projects/101/app-users
The text was updated successfully, but these errors were encountered: