Conditional Visibility of Additional Questions in Checklist

Forms module got a new functionality where you can dynamically show/hide questions/subforms based on answers given by the user.

Generally, functionality gives you the possibility to define that some questions are visible only, when specific answer is given on previous question. The order of questions is important and must be taken into consideration.

Only answers given to specific questions can control the visibility of other questions. h4. Supported types of questions:

  • select
  • boolean - to show other questions when true is selected
  • text
  • text area
  • text with history
  • integer
  • decimal
  • record lookup

Other fields are not supported.

All types of fields can be hidden/shown.

To define variables that will control question visibility - you need to go to Variables on the Form Template Card.

Here you can create a set of variables that can be used on this one specific template. When you add records to this table - the proper indentation is applied so you can see how variables are organized.

Variables can have type:

  • boolean - it can get a value from a boolean type question
  • numeric - it can get a value from a numeric type question
  • text - it can get a value from a field where the text is an answer (text type/select/lookup)

Answers given on Numeric and Text question will be assigned to this variable, and boolean values related to this variable, can change given answer to boolean control. On the given example. We have prepared a numeric variable that will get an answer from the decimal type question. We want to check if the given answer is:

  • less than 15.15
  • higher than 20.15

That is why we have added two additional variables that are defined as Calculated.

Our next step is to define how the boolean value is calculated. To do this we need to select Formula of the variable.

Here you need to define the following:

  • which variable is the source of data in this formula
  • what is the operator - operators are described later in the article
  • what is the parameter

When it is done - variable should get the proper indentation so it is easy to see how variables are connected to each other.

Operators

Available operators are typical for logic formulas.

Operators for numeric formulas ||Symbol||Definition|| |=|Equals| |<>|Different than| |>|Higher than| |>=|Hither than or equal| |<|Less than| |<=|Less than or equal|

Operators for test formulas ||Symbol||Definition|| |Contains (CI)|Answer contains a specified value (case insensitive)| |Contains|Answer contains a specified value| |Is Not Empty|Answer is not empty| |Is Empty|Answer is empty| |Does Not Contain (CI)|Answer does not contain specified value (case insensitive)| |Does Not Contain|Answer does not contain specified value|

If you have all the needed variables you can set up a visibility of your questions.

On the list of questions, you can define variables for questions (with types described [here|file:///C:/Users/ratmi/AppData/Local/Temp/crossnote2025226-8348-is8knu.3t77r.html#supported-types]). You need to add Variable to the question from which the given answer controls the visibility of another question. On hidden/visible questions you need to specify Visible.

You can add more than one Variable and more than one definition when the question should be visible.

Without these values - all questions are visible by default.

Thanks to that visibility of other questions can be changed based on the given answer.

When you already input an answer but later this field is hidden because of another answer - the system does not remove the given answer.

Version without a given answer on the first question.

Version when answer Select A is given on the first question.

Version when answer Select C is given on the first question.

Completing form by more than one user at the same moment

In the scenario when person A and B have the form open at the same time when person A saved the form and person B is trying to do the same thing (or trying to submit the form) - this process is applied:

  • all incoming answers are compared with given answers
  • person B needs to decide what answers are going to be kept
  • person B sees what was hidden for the person A

Here you have an example of how such a situation might look.

  • you need to accept incoming answers or keep your answers for each question that controls the visibility of others
  • None action is on these questions that are visible or not based on a question above them - answers are accepted based on their 'main' question
  • if there are no given answers - the visibility of the question is treated as a change

If you are using Automatically Merge Blank Answers from the Forms setup - you will still need some blank answers here - because the user needs to be aware that some questions might have different visibility. h4. Completed Forms

Answers given on a form show the answer and state whether the field was hidden when the form was submitted.

On the completed forms you can also inspect the values of variables created during the form execution.

A printable form is always showing only visible questions.

Copyright Dynaway A/S

Privacy Policy