Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Custom Drag and Drop Ranking used with Not Applicable per question


I have a situation where I needed to use the Custom Drag-and-Drop Ranking (respondent must rank 1-2 items).  They also want a 'Not Applicable' option.   Is this possible?  I tried adding the NotApplicable and BetterLighthouseLibrary after the custom ranking question, but then it is requiring at least one item.  If I change the minimum to 0, then you can proceed without selecting anything.  Any way to modify this?
asked Dec 3, 2020 by Jay Rutherford Gold (39,750 points)
This has proven to be quite the hairy problem.  For the most part, I'd anticipate Not Applicable being able to play nicely with customized questions, but Custom D&D Ranking doesn't cooperate because it works by invisibly answering the question.  I want to spend some more time with this, but in the meantime would it be sufficient to keep the minimum at 0 and move the Not Applicable question to before the ranking question (with the "questionName" setting defined within N/A)?
That explains why I was having problems with some other attempts.  

I'm not sure if I follow you on your suggestion here.  So moving the NotApplicable to before my Ranking question (Q13), but still on the same page?  And what do you mean about defining the "questionName" setting within N/A?
Yes, still on the same page, but earlier in the question list than the ranking question.

Not Applicable expects to be placed immediately after the question it is meant to apply to, but it comes with an optional setting where you can manually point it to any question on the page.  The setting should be on line 23 of Not Applicable's footer.
Got it.  That seems to work well as it still shows below the Ranking question.  One odd thing I'm seeing testing it locally is that if I backup and change responses it is not behaving properly.  If I back up to before that question and try to go through again I'm getting a Sawtooth error.  However, when going straight through and not backing up it functions as desired.  Could this be a local testing issue or possibly a larger issue where I would not want to allow backing up once the answer has been submitted?
Does the problem happen when checking and then unchecking Not Applicable's checkbox?
Yes, that seems to be part of it.  That blocks me from dragging items and then if I backup to the page before and go to that question again it crashes with Sawtooth Error #269.  However, I think I have something larger going on.  I realized that I had Helper2 on the same page and my understanding is it should be on the next page after the Ranking question and Helper 1.  When I moved it there I got a Sawtooth error every time no matter what.  When I put it back on the same page we go back to the original issue I described.
The second helper is expected to be on whatever page comes after the ranking question, but it can optionally be removed entirely so long as you understand come analysis that the first helper's "_NumberRanked" represents how many items were actually ranked by the respondent; any item that claims to be ranked beyond that should be understood as fake data.

Originally the second helper question included this:

SETVALUE($variable, '');

But it now uses this instead:

SETVALUE($variable, 0);

Which are you using?
The second helper is setting it to 0 as your second example shows.  On line 9 of the 2nd helper would I need to change 'CustomDndRanking' to what I named that question (Q13)?
Thanks, I realized that after diving in a little more and that took care of one problem.  Where I sit now is as you said if you click the Not Applicable and then uncheck it the error message is triggered even if items have been put in the bucket.  There seems to be no issue with backing up at this point.

Your solution to the original question

Please only use this to answer the original question. Otherwise please use comments.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

To avoid this verification in future, please log in or register.