Hi guys, I don’t understand Dynamic Data Attachaments, sometimes it work, others not, and sometimes it work for some records and not for others, as I will show you here. Yes, I read the Dynamic Data Attachemtns Wiki.
I built a parent/child instrument where:
- parent: registry form, that creates a unique regID number with this formula:
once(concat(substr(now(), 8, 10), substr(now(), 5, 7), substr(now(), 2, 4), substr(now(), 11, 13), substr(now(), 14, 16), substr(now(), 17, 19)))
This formula generates a unique ID based on the datetime of the first submission of the participant. Like this one: 090224032554
.
- child: that pull partiicpant name from the parent form using the regID.
On the child form I set the xml as instructed in the wiki:
I set the shared kobo projects naming the instance as reg too.
And I set the calculated variable as this:
instance(“reg")/root/data[regid=current()/…/fup_regid2]/child/age
The id field is named regid on the parent folder and fup_regid2 on the child form.
Then I submited some observations. However, for some IDS (blue ones) the data is pulled from the parent form, for others (red ones) not.
Can you help me figure out the problem?