Completed subform instance not populating


I occasionally have this challenge with my survey.
I have a parent form which will also links with a child form. Once in a while I encounter a problem where a previously completed child forms/instances (subform) does not appear but instead the Create New Instance only appears. The instance data will be there but it just can’t show up on the completed instances. I tried checking the linking columns to see if they match and always I get these to be matching but still the issue persist.
Would anyone have any idea about this and any indication of where the issue might be?

Hi @cmuchuchuti! One reason we sometimes have the subform not appear is if the linking variable has different types (text and string or integer and string) in the two different forms. Can you check in the model statements that the key linking variables are the same type in both places?

Thank you @elmps2018 for the response. Just to be sure, for linking the subform does ODK-X use the selection column variable or it uses the newRowInitialElementKeyToValueMap? I was assuming the selection is what we use and if so then the variables are defined the same. However if the newRowInitial is used then on the select_one I was then using integer for the subform, not sure if that might be the issue.

The selection and selectionArgs are what should link the data up. But if one of the selection items is mapped in the newRowInitialElementKeyToValue map (for example, you select on household_id and it is mapped in newRowInitialElementKeyToValue to get it from the main form to subform) if those are different types in the main and sub-form that can cause problems. Having an integer rather than a select_one may cause problems as well so it can’t hurt to change that.

Thank you @elmps2018 will try and do the necessary changes to match all the variables.

1 Like