Merging two embedded data into one to be saved in a Contact List as two codes. | XM Community
Skip to main content

Hi all,

For part of a project, we are asking participants to nominate two members of their family to participate in a Stage 2. Unique codes for these two family members will be automatically generated and stored as two different embedded data (i.e., Code_1 & Code_2). These codes would be saved into a new contact list and an authenticator will be set up for the Stage 2 link so that ONLY the generated codes can have access to Stage 2.

The problem

The two generated codes will be saved in two different embedded data fields in the initial survey. However, in order to save the codes into the contact list under the same “code” field (i.e., External Data Reference etc.), they will need to be first saved under the same name to be saved under the same column in the contact list, so that the authenticator can pick them up.

However, if I were to set it up so that Code_1 and Code_2 is saved under the same third embedded data field (i.e., ExternalDataReference), one will override the other, and only one will be saved in the contact list.

My question

Is it therefore possible to have the two generated codes saved under the same variable name so that they are both stored in the contact list to be used in the authenticator during Part 2 of the survey?

Note – I know it could be possible to set up a loop to allow participants to nominate as many people as they want, but ideally I wanted to stick with 2 for now to make it more manageable for the team. Also, I wanted to make it all on one survey rather than a loop in case people are inviting twins as this is a key part of some of the research. 

@Super_Recognisers 

Hi, have you tried including 2 add to XMD tasks? One where the externaldatareference would be code1 and other where it would be code2. 
If all of them are unique and your deduplication is on externaldatareference you should be able to save these in new list and use them in stage 2.

Hope it helps!


@Deepak Apologies for the delay in responding. That is such a simple solution. I was definitely overthinking with something technical.

Thanks for your help!


Leave a Reply