Section and Field Visibility will NOT work on the main application or the mobile application if it references an option calculation that is scored
You need to be very careful using an option WITH a score if you are setting up field/section visibility settings
Please read the following steps to ensure you are familiar with the difference between options with scores and options without scores.
Field 1 is set up with an option with no scores. It will be treated as a normal option field, and any visibility setting based off it will work
Field 1 is set up as an option only (e.g. with no scores). It can be used for option calculations and for field and section visibility settings.
This means it cannot be used in "calculations" (use reference numbers), but it can be used in "option caculctions" and "text calculation" fields
Field 1 is being referenced in an option calculation. This option calculation sets the visibility for sections 2 and 3.
#1:Field 1 is set as an option field with no scores:
#2: Field 1 is being referenced in an option calculation called "Option Calc Field 1" which will return "Yes" if A or B are selected, and "No" if C,D, E or F are selected (If (or(Field 1 = "A", Field 1 = "B"), "Yes", "No")
#3: The section called "2: Option Calc 1 Field 1 Yes" will be shown if the option calculation returns "Yes"
#4: The section called "3: Option Calc 1 Field 1 No" will be shown if the option calculation returns "No"
"Field 2 Scored" is set up with a Score for each Option. As soon as you reference an option with a score in a calculation, it changes from being recognised from an option, to a number
"Field 2 Scored" is being referenced by three different option calculations, and these all individually set the visibility for sections 4 and 5, 6 and 7, and 8 and 9, respectively
All three of the option calculations are written to return "Yes" if A, or B, are selected, and "No" if C,D,E or F are selected. However, only two calculations are written correctly, one is written incorrectly and it will not return the correct answer:
#1 Option Calc Field 2 is written incorrectly; it is using the option as an option, not as a score. This equation will never run correctly and it will not be able to be used correctly in field/section visibility settings.
- If (or(Field 2 Scored = "A", Field 2 Scored = "B"), "Yes", "No")
#2: Option Calc Field 3 is written correctly; it is defining the option as an option (not a score) and the calculation will work correctly
- If (or(option(Field 2 Scored) = "A", option(Field 2 Scored) = "B"), "Yes", "No")
#3: Option Calc Field 4 is written correctly; it is treating the option as a number, and the calculation will work correctly.
- If (or(Field 2 Scored = 1, Field 2 Scored = 2), "Yes", "No")
WARNING: Because the field "Option Calc Field 2" is written to treat the options as an option (not as a score) this calculation will NEVER work
This calculation is written so that if A or B are selected, then "Yes" should be returned. Because the calculation is written incorrectly, it continually returns No and this then affects the subsequent section 4 and 5 section visibility. Because options with scores are treated as numbers, not options, this option calculation question will never be able to return "Yes".
If you are using linked options fields from other Event Forms, the same rules will apply. If you assign scores to a linked options, this field need to be treated as numeric, not as an option.
In the example in the image here, this Event Form has been set up exactly the same as the Event Form used in all of the above screenshots, except that the "Field 1" and "Field 2 Scored" Fields are linked option fields from a different Event Form. However, "Field 1" has been set up with options with options without a score, and "Field 2 Scored" options have been given scores. This means, any option calculations that reference the scored linked option field need to be set up in exactly the same manner as for scored options; use the score, or reference them using the word "option" before the option.
0 Comments
Add your comment