Determine if Any Answer in a Repeated Dialog is True

From HotDocs Wiki

Jump to: navigation, search

You can determine if any answer for a repeated variable meets a certain condition. For example, if you have a repeated dialog in your template that collects information about a client's children, the dialog could include a question asking whether the child is married or not. Then, if one or more of the children are married, the template could ask additional questions. If all children are single, however, those questions would not be asked.

The following computation determines if one or more of the answers for a repeated True/False variable is true. The computation begins with a false value, and as the dialog containing the True/False variable is repeated, the result is changed to true if the answer for one or more of the True/False variables is true.

Note: If you want to count the number of true responses, see Determine Number of True Responses in a Repeated Dialog.
FALSE
REPEAT Repeat Dialog
  IF TrueFalse Var
     TRUE
  END IF
END REPEAT
Repeat Dialog Any repeated dialog containing a True/False variable (TrueFalse Var).
TrueFalse Var Any True/False variable in a repeated dialog (Repeat Dialog).