Autopunching Rank and Carry-Forward Option – Ranking Question Skipped Due to Only 1 Option Selected | XM Community
Skip to main content

This is a situation that we run into a lot.  We have an extremely inefficient way to resolve this, so I am hoping that someone has a suggestion that works better.

 

Here is the scenario:

  • QID1 is a “Select All” Question, with an “Other” choice with a text box
  • QID 2 is a “Rank Order” question that carries forward the selected responses
  • If only one choice is picked for QID1, QID 2 is skipped.

What we are trying to do:

  • When only 1 choice is selected, we want the choice to populate QID2.  In addition, we want the rank for that choice populate with a 1.
  • We want the rank to populate the “Other-text” rank field, instead of just the “Other” rank field.

 

Any assistance would be greatly appreciated.  Thanks!

Try this,

var QID1_val=’’ #pipe in selected choices from qid1

var qid1=QID1_val.split(‘,’)

if(qid1.length==1)

{

jQuery(‘inputytype=”text”]’).val(qid1)

jQuery(‘#NextButton’).click();

}


Dumb question - still fairly new to Java Script - Does the piped in selected choices (I assume ${q://QID1/ChoiceGroup/SelectedChoices}) need to be in quotes?  Sorry, I’m getting errors.


@rgupta15  Dumb question - still fairly new to Java Script - Does the piped in selected choices (I assume ${q://QID1/ChoiceGroup/SelectedChoices}) need to be in quotes?  Sorry, I’m getting errors.


@SARVAN,

You might be interested in the skipFollowUp function. It does exactly what you want and works with any format of ranking question as well as multiple choice, constant sum and PGR questions with little to no configuration (and no piping).


@SARVAN,

You might be interested in the skipFollowUp function. It does exactly what you want and works with any format of ranking question as well as multiple choice, constant sum and PGR questions with little to no configuration (and no piping).

I’ll give that a whirl, @TomG .  Thanks!


@TomG Unfortunately it did not work. 


@TomG Unfortunately it did not work. 

That’s because you don’t have the skipFollowUp function code. As the page linked indicates, you would need to contact me by private message.


Ahhhh..  makes sense

 


Leave a Reply