Syntax for calculation when the compare variable not in the same questions group

Hi team,
instance(‘survey’)/root/data[P_Demographic/P_SN = current()/…/C_SN]/P_Demographic/P_Location here is the example in the article. But in my project C_SN belongs to different group. What should I change in the syntax? I have tried to change the 2 dots … to the name of the current question group but it doesn’t work.
Thank you all.

Hi @manh_nguyen,

In the example case, P_Demographic is the group name. Changing that to the name of your group should work.

1 Like

Hi @hakan_cetinkaya,
I mean the C_SN in the child project but in different group not the P_SN. That why I was thinking of changing the path current()/…/C_SN to like current()/group_name_in_child_project/C_SN

@manh_nguyen,

Can you try changing the syntax into something familiar to this one:

current()/../**NEW_GROUP_NAME**/C_SN

It should work in this logic, but if not, can you share the screenshot of both your parent and child projects?

1 Like


this isis the child project but i named it with p_ hope it won’t make it confused
and this is the parent project.

thank you so much for your help

I have tried both syntax current()/…/p_general/p_Case_ID and current()/p_general/p_Case_ID but it doesn’t work

@manh_nguyen,

Are the other questions work as intended in the form or is it a general problem?

Because if second, in the help article it says:

Note: The name used for the xml-external question type in the child project is crucial for linking with the parent project . In the above example, it was named “survey”, but it can be any name consisting of Latin characters and numbers.

Can you change the name of the child survey something without a _ (underscore), for example instead of p_survey to psurvey?

1 Like


this part work perfectly as below.

all the part in the general group show automatically but in the death group it doesn’t work

Hi @Kal_Lam can you help me to check the syntax in the child project please. I still couldn’t find the answer for this

parent

child

child.xlsx (9.6 KB)
parent.xlsx (6.1 KB)

I had the same challenge.

The way I solved it was by using ‘calculate’ to get my case ID in each group of the parent form.

It worked flawlessly after that.

Hope that helps,
Kabira

1 Like

@manh_nguyen, can you check @kabira_namit’s solution to see if that works for you?