COUNT( DIALOG )

Placeholder Tooltip Replace With
DIALOG dlg: Dialog A dialog name

Returns a Number value

You can find out how many sets of answers a user provides for a repeated dialog. A repeated dialog is any dialog used in a REPEAT instruction. This expression produces a number, based on each answered dialog.

The following example determines if there is more than one fiduciary. If there is, certain prefixes and plural abbreviations are added to the fiduciary title so the paragraph is structured correctly.

I appoint «REPEAT Fiduciary Information:a, b, and c»«Fiduciary Name:LIKE THIS»«END REPEAT» as «IF COUNT( Fiduciary Information ) > 1»Co-«Fiduciary Title»s«ELSE»«Fiduciary Title»«END IF».

This expression uses the COUNT instruction to determine if Fiduciary Information is answered more than once. If it is, the Co- prefix is inserted before Fiduciary Title, and the plural s is inserted at the end of the variable. For example, in the assembled document, the answer may be inserted as Co-Executors or Co-Personal Representatives.

The difference between COUNT and COUNTER is that COUNT counts the number of repetitions in a list, while COUNTER gives you the number of the current repetition.