I have a parent and child form linked using connect projects. It works as the support article specified.
The article only shows how to pull data with the instance function where the ID used in searching and the value to retrieve are within the same group.
In my case and in the parent form, I have group1, group2, and group3. group1 has the ID and group3 has a Date.
In the child form I use this: instance('survey')/root/data[group1/P_ID = current()/../C_ID]/group1/P_Name
and it returns the name from the parent form.
But when I try to get the Date from group3 in the parent form, it does not work.
I tried all the below combinations without any results:
instance('survey')/root/data[group1/P_ID = current()/../C_ID]/Date
instance('survey')/root/data[group1/P_ID = current()/../C_ID]/group3/Date
instance('survey')/root/data[group1/P_ID = current()/../C_ID]/../group3/Date
instance('survey')/root/data[group1/P_ID = current()/../C_ID]/../root/data/group3/Date
instance('survey')/root/data[group1/P_ID = current()/../C_ID]/../data/group3/Date
I even have a question in the parent form called “remarks” that is outside all groups and tried to get its value with:
instance('survey')/root/data[group1/P_ID = current()/../C_ID]/remarks
instance('survey')/root/data[group1/P_ID = current()/../C_ID]/../remarks
instance('survey')/root/data[group1/P_ID = current()/../C_ID]/../root/data/remarks
instance('survey')/root/data[group1/P_ID = current()/../C_ID]/../data/remarks
and did not work.
I am not familiar with these expressions and did not find any documentaion on how to use instance function and navigate different nodes/groups.
Thanks
Isslam