Embedded data in unanswered questions? | XM Community
Question

Embedded data in unanswered questions?

  • 13 January 2020
  • 5 replies
  • 117 views

Userlevel 1
Badge +1
Greetings gang, so here's the deal, in my registration survey I take the entered info and inject it into my XM Directory as embedded data fields (via Contact List trigger). Nothing new there but my problem is this: when a person fills out the survey it records their information including address. So there is a field for "address (line 2)" where people usually put things like "apt 1" and such. This all works fine and without issue. The information shows up in their Directory entry in an embedded data field called "Address2". The problem is that if they take the survey again later (say after they move) and leave that text box empty (maybe they've moved into a house with no "address line 2" that empty entry is *not* injected into the Directory to replace the previously entered "apt 1".

So I really have two questions:
1. How do I make sure that if a field is left blank, that "blank" (empty) field is put into the embedded data field for that person?
2. Say I have 20 questions in my registration survey and 5 of them have display logic attached to them so they are only shown if the person selects "yes" for a previous question's answer. The first time through the registration survey they say "yes" to this initial question and then see the 5 other questions and fill those out (which have contact list triggers on them so the answers to those 5 become stored as embedded data in the Directory). Then, a year later they take the survey again to update their info and they now select "no" for that initial question. So now they aren't going to see those 5 display logic questions--how do I blank out (empty) those 5 questions when the Contact List trigger fires?

For #1 I tried putting a single space as a "default choice" did not work (it didn't change the embedded data field injected into the Directory from what it had been the previous time_ and I also tried the following Javascript: Qualtrics.SurveyEngine.setEmbeddedData("Address2", jQuery("<span>${q://QID90/ChoiceTextEntryValue}</span>").text());

5 replies

Userlevel 6
Badge +5
Hi,

Thank you for sharing. I am actually running into a similar but opposite issue. I have a question that only a few people are supposed to see and I only want it to carry forward selected options to the contact list. However for everyone who does not see the question it is carrying a blank value over to the contact list.

So to answer #1 of your question, you should be able to setup a contact list trigger with "selected choices" for that question and it should work the way you need it to.

I am curious how you have it setup currently, as I need my survey to work the way yours is but have been unsuccessful thus far.
Userlevel 1
Badge +1
> @uhrxx005 said:
> Hi,
>
> Thank you for sharing. I am actually running into a similar but opposite issue. I have a question that only a few people are supposed to see and I only want it to carry forward selected options to the contact list. However for everyone who does not see the question it is carrying a blank value over to the contact list.
>
> So to answer #1 of your question, you should be able to setup a contact list trigger with "selected choices" for that question and it should work the way you need it to.
>
> I am curious how you have it setup currently, as I need my survey to work the way yours is but have been unsuccessful thus far.

But the issue is that "selected choices" is not an option for text entry fields. The only two options are "question text" and "Address (Line 2):" with that second one being the answer they type in the text box. I have the second one selected.
Userlevel 6
Badge +5
Maybe try structuring it as a multiple choice question with text entry spot. It's not ideal but it should allow you to send the blank values to the contact list.
Userlevel 1
Badge +1
I think I'm just going to have the people put that second line into the first address text entry (which is force response). It's just too clunky a workaround.

But I guess I'm still looking for a way to deal with my second part. I can set a 2 answer matrix question to have "default choice" of "No" but if the person filling out the survey doesn't see that question then, even though there is a contact list trigger to inject the answer to that question into an embedded data field in their Contact List entry, the "No" doesn't overwrite the "yes" they could have put in last time they took the registration survey.

Can this perhaps be done with Javascript? Perhaps something along the lines of "If this person did NOT see question 20 then set embedded data field to NO"?
Userlevel 1
Badge +1
I've been thinking about this some more and I think the way I'll probably handle it is to simply create any embedded data fields that a user might *not* see at the start of the survey and set them to "No". Then, if they don't see the question it still gets the "No" value in their directory entry but if they do see the question and answer it, it gets the accurate ("yes") info.

Leave a Reply