Resetting Embedded Data 📉 🤞 | XM Community
Skip to main content
Question

Resetting Embedded Data 📉 🤞

  • March 22, 2024
  • 4 replies
  • 220 views

Forum|alt.badge.img+5

Hi Everyone,

I hope you can help. 🤞

Participants access my survey through authentication that loads embedded data.

When a participant reaches a particular question, which is a straightforward 'Yes / No' query, if the response is 'No', I aim to reset specific existing embedded data fields.

I truly appreciate any assistance the community can offer on this matter; it's the final hurdle I'm facing!

Thank you :)

4 replies

Sachin Nandikol
QPN Level 6 ●●●●●●
Forum|alt.badge.img+44
  • QPN Level 6 ●●●●●●
  • 530 replies
  • March 22, 2024

Hello @parkie_0007,

I recommend trying the following steps:

1. After placing your 'Yes/No' question in the survey flow, select ‘Add a New Element Here’ below it.
2. Choose ‘Branch’ from the options.
3. Configure the branch condition to check if the response to your 'Yes/No' question is 'No'.
4. Within this branch, click on ‘Add a New Element Here’ and select ‘Embedded Data’.
5. In the Embedded Data element, include the fields you wish to reset and assign their values to the new values you want to use when the respondent answers 'No'.

Please keep in mind that this action will only impact the data collected moving forward and will not alter any values that were already recorded in the survey.

 

Let me know if this works.


Forum|alt.badge.img+5
  • Author
  • Level 5 ●●●●●
  • 157 replies
  • March 22, 2024

Thanks @Sachin Nandikol 

Super helpful.

5. In the Embedded Data element, include the fields you wish to reset and assign their values to the new values you want to use when the respondent answers 'No'.

So if for example ‘Territories’ was ‘France’.

What would I put in the pink section to clear the existing embedded data?

Thanks :)


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6083 replies
  • March 22, 2024

@parkie_0007,

Once you set an embedded data field, you can’t unset it in the survey flow (i.e., make it empty/null). You can only set it to something else. If the reason to unset it is for piping you could set it to ​ (zero width space). Otherwise, you can set it in JavaScript:

Qualtrics.SurveyEngine.setEmbeddedData("Territory","");

 


Forum|alt.badge.img+5
  • Author
  • Level 5 ●●●●●
  • 157 replies
  • March 22, 2024

Thanks @TomG 

Like this?

Thanks :)