Have an idea?

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

Issue with Custom Javascript Validation

I have a grid question, column oriented, that is set as  a Constant Sum type question.  I have custom javascript verification set to make sure they don't enter a response in the other specify box (which is item 7 of the list).  For some reason it is triggering even when the value for row 7 is greater than 0.  I'm not seeing what is wrong with the script.

if ((SSI_GetValue ("QS11_r7_other") != "") && (SSI_GetValue ("QS11_r7_c1") < 1))
var strErrorMessage = "You DO NOT need to enter your other response in the box provided unless you assigned a percentage to it";
asked Nov 9, 2022 by Jay Rutherford Platinum (52,770 points)
It looks like my parenthesis were causing an issue.  I replaced with this and it seems to be functioning properly now.

if (SSI_GetValue ("QS11_r7_other") != "" && SSI_GetValue ("QS11_r7_c1") < 1)
I'm glad you've got things working, though the parentheses should not have had this effect.  My guess is that some other factor was at play and has been changed in the interim.
Yeah, I didn't think that should have mattered either, but there was nothing else I changed.

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.