Dynamic Data Attachments not working

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:


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?

Welcome back to the community, @andresimi! Maybe you will first need to try the XLSForm that is attached in the support article to get used to how it works. Once you are comfortable with the XLSForm, you could then start modifying the syntax there (as per your need).

Thanks for the prompt response. But that was not the problem. I followed every step of the wiki.
The problem seems to be related to regIDs that starts with 0 (zero). I changed the field fup_regid to text instead of integer and that solved the problem.

1 Like

@andresimi, :clap: :heart: :partying_face: