Dynamic data attachment expression for checking in difference group

Hello.

The Dynamic data attachment worked fine for me with default Syntax, for example:
instance(‘survey’)/root/data[P_Demographic/P_SN = current()/…/C_SN]/P_Demographic/P_Age

But it only work with the calculation inside same group with C_SN question.
If I make the calculate in difference group with C_SN, for example:

  • The C_SN is in group check_group
  • the question calculation Previous_Age (which call P_Age’s value from parent survey) is in group history_group

=> the Syntax return nothing for Previous_Age

I tried to change current()/…/C_SN to /data/check_group/C_SN but it also does not work

Do you guys know any solution for this?

Many thanks.
TK

Welcome back to the community, @kienl! Maybe this post discussed previously (with sample workarounds) should help you solve your issue:

Thank @Kal_Lam for the quick response.

I tried to follow the sample but it did not work.
I attached my example forms to be more clear about this topic

Parent survey:
Round 1 (Within Groups).xlsx (15.9 KB)

Child survey:
Round 2 (Within Groups).xlsx (12.4 KB)

The calculation in row 23 and 24 in Child survey did not pull the data from parent survey and return nothing.

All the bests,
TK

I have the same issue @Kal_Lam , The examples that you posted are all within the same group. In the Round 2 file you have only one group “C_Demographic” that also contains the ID “C_SN”. When you add a second group and copy the calculation and try to use “C_SN” in the same way, it does not work. I couldn’t find an explanation about the syntax behind the instance function and how to navigate different groups within the same child survey. All links I found are linking back to this article and this post both lacking a solution. Only having the entire example based on a single group. Thanks for any help.

1 Like