Have an idea?

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

not applicable in grid

I have a grid question named A4 that has the first column of numeric responses and the second column is all "don't know" responses.

Is there a way to make it so the respondent has to enter a numeric response in like row 1 column 1 or check the "don't know response in row 1 column 2
asked Mar 5 by kaitlan
If I might add another option, "Not Applicable: Per Variable" from the Community Question Library may be of use to you:

https://sawtoothsoftware.com/community-question-library/1748-not-applicable-per-variable

1 Answer

0 votes
Hi,

I have not checked by running this but you can write something like below jquery in the footer section of your question to achieve the same,
<script>
var temp1;
var temp2;
                
$(".numeric_input").keyup(function(){
    temp1 = this.id;
    var temparr=temp1.split('_');
    if(temparr[2]=="c1"){
        temp2=temparr[0]+"_"+temparr[1]+"_c2"; 
        SSI_SetSelect(temp2, false);                                 
    }
});

function SSI_CustomGraphicalCheckbox(GraphicalCheckboxObj, InputObj, blnCheck){
    if(blnCheck == true){
        temp1 = InputObj.name;
        alert(temp1);
        var temparr=temp1.split('_');
        if(temparr[2]=="c2"){
            temp2="#"+temparr[0]+"_"+temparr[1]+"_c1";  
            $(temp2).val('');                                 
        }
    }
}
</script>

Regards,
VInay AG.
answered Mar 5 by Vinay Agrawal Bronze (680 points)
edited Mar 7 by Vinay Agrawal
Thank you... so this kind of works

If I check the "don't know/not applicable" box first and then enter a value in the numeric column, the box becomes unchecked.

But if I enter a number first, then check the box I am still allowed to do both.

Any thoughts on how to modify this so that I am forced to either enter just the number or check the box?

Thanks!
I have just updated the code. Just try this one and let me know if it can fulfill your requirement.
...