AnsweredAssumed Answered

Conditional field access

Question asked by JCrawford on Jan 18, 2013
Latest reply on Jan 23, 2013 by JCrawford

Title

Conditional field access

Post

     Hello

     I am preparing a medical questionnaire administered by computer. If a client has a health condition, he or she is expected to enter some details. If not, the tab control should skip to the next question. Example:

     Field 1: Do you have diabetes?

     Drop Down Value List: Yes No

     If Field 1 is answered with "Yes," the tab control should advance to Field 2, where the user is supposed to supply details about their diabetic condition.

     If Field1 is answered with "No," the tab control should advance to Field 3 and skip Field 2 entirely.

     The health survey is 19 pages long so I have to write this script several dozen times. I would like a one-size-fits-all script trigger, but I can't figure out how to do this. Here is my futile attempt so far. This script trigger is activated upon Exit from the Yes/No field. It is supposed to jump from Field 1 to Field 3 but it doesn't.

     _____

     SetVariable($FieldName; Value:Get(ActiveFieldName))

     If ($FieldName="No")

       Go to Next Field

       Go to Next Field

     End If

     Exit Script

     _______

     Thank you for any help.

Outcomes