Dynamic linking syntax not working- unable to deploy child project

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.

@ajkew, maybe you will need to check your form to see if this variable surname exists. In addition, please also check other variables that you see in the error message.

The surname field (and others) exist in the parent project, as I’m trying to pull the surname that matches the Identifier/CIN field in the child/parent projects.

This is the setup in the parent project:

And the setup in the child project:

If anyone can help with this, perhaps giving an example of linking syntax in the calculation column that is working, I would really appreciate it!