embedded data for sliders | XM Community
Skip to main content

embedded data for sliders

  • September 30, 2022
  • 5 replies
  • 24 views

Forum|alt.badge.img+1

I have a question with 4 scoring sliders (0-5) which are not mandatory. I would like you to set an embedded data that if a slider is unselected, the value should be 0.
Is that possible?

5 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • September 30, 2022

Do you want embedded data fields or the value of the unselected sliders set to zero?


Deepak
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+46
  • September 30, 2022

Simin
You can include 4 embedded data with a hardcoded value o '0' in it e.g.: ED1=0.
And at the end of survey or after block just update the embedded data via a branch logic something like this for all 4 sliders:
image.pngThe one's which have the value of 0, the respondent may have selected 0 or might have not slided the slider.

Hope this helps!



SuhasM
Qualtrics Employee
Forum|alt.badge.img+16
  • Qualtrics Employee
  • October 4, 2022

Great job on providing a solution Deepak along with screenshots! 🙂


Forum|alt.badge.img+1
  • Author
  • October 6, 2022

TomG I want to set the value of the unselected sliders to zero.


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • October 6, 2022

https://community.qualtrics.com/XMcommunity/discussion/comment/50464#Comment_50464That's what I suspected. Use this:
Qualtrics.SurveyEngine.addOnPageSubmit(function() { 
jQuery("#"+this.questionId+" .ResultsInput").filter(function(){return this.value.length==0;}).val("0").trigger("change");
});