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

Autopunching Rank and Carry-Forward Option – Ranking Question Skipped Due to Only 1 Option Selected

  • Aug 16, 2023 5:57 PM UTC
  • 8 replies
  • 130 views

Forum|alt.badge.img+1

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!

8 replies

rgupta15
Level 4 ●●●●
Forum|alt.badge.img+8
  • Level 4 ●●●●
  • Aug 16, 2023 6:38 PM UTC

Try this,

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

var qid1=QID1_val.split(‘,’)

if(qid1.length==1)

{

jQuery(‘input[type=”text”]’).val(qid1)

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

}


Forum|alt.badge.img+1
  • Author
  • Level 2 ●●
  • Aug 16, 2023 7:45 PM UTC

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.


Forum|alt.badge.img+1
  • Author
  • Level 2 ●●
  • Aug 21, 2023 3:00 PM UTC

@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.


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Aug 21, 2023 3:21 PM UTC

@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).


Forum|alt.badge.img+1
  • Author
  • Level 2 ●●
  • Aug 21, 2023 4:50 PM UTC

@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!


Forum|alt.badge.img+1
  • Author
  • Level 2 ●●
  • Aug 21, 2023 6:40 PM UTC

@TomG Unfortunately it did not work. 


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Aug 21, 2023 7:28 PM UTC

@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.


Forum|alt.badge.img+1
  • Author
  • Level 2 ●●
  • Aug 21, 2023 8:08 PM UTC

Ahhhh..  makes sense