I’m having difficulty linking a parent and child project. The parent project has been deployed, and data sharing enabled.
In the child project XLS form, there is syntax in the calculation column to link individual beneficiary information to that entered in the parent project, based on an ‘identifier’ field. When the identifier is entered in the child project, I want fields such as surname, first name, age, and sex to autofill based on entries in the parent project. An example of the calculation syntax:
instance(‘DWCTbeneficiary’)/root/data[general/CIN = current()/…/Identifier_a]/general/surname
However, I keep getting an error when trying to deploy the child project:
ODK Validate Errors: >> Something broke the parser. See above for a hint. Error evaluating field ‘surname_a’ (${agro_ind}[1]/surname_a[1]): The problem was located in Calculate expression for ${surname_a} XPath evaluation: Instance referenced by instance(DWCTbeneficiary)${surname} does not exist Caused by: org.javarosa.xpath.XPathMissingInstanceException: The problem was located in Calculate expression for ${surname_a} XPath evaluation: Instance referenced by instance(DWCTbeneficiary)${surname} does not exist … 10 more The following files failed validation: ${tmp2jpydlm5} Result: Invalid
I’ve even set up the connection to the DWCT beneficiary parent project by importing the data via settings → connect projects.
So it seems that perhaps something is wrong with my syntax, but I can’t work out what it could be. I’ve followed the guidance in the dynamic attachment page (Dynamic Data Attachments — KoboToolbox documentation) but still can’t resolve this error.