This next example introduces 'cascading logic.' The ability to use the values of a precedent value (or two or three) to set a subsequent value (or to cascade a series of questions).

   A 'Last Will' is the objective. The questions posed are "Sex of Client? (Male or Female)", "Is Client Married? (Yes or No)" and 'Does Client have children?" With that information, other decisions can be automatically set or other relevant questions posed.

<<*AskOptions(radio)*!T-orSex!Testator = Male/Testator = Female*>>

<<*AskOptions(radio)*!Client Married!Client is Married/Client is Single*>>

<<*AskOptions(radio)*!HasChildren!Client has children/Client has no children*>>

<<*If*!HasChildren!="1",<<*AskRepeat*!NumChildren!Number of Children*>>,!NumChildren!=”0(#)”>>


<<*If*!NumChildren!>"0",<<*AskOptions(radio)*!AllAdults!All children adults/Minor child(ren)*>>,!AllAdults!=”1(2)”>>

<<*If*!NumChildren!>"0" AND !AllAdults!="2",!Guardian!="True",!Guardian!="False">>


   Note the use of the <<*If*. . .>> operation. <<*If*. . .>> is simply determining the value of a group and using the result to present one of two subsequent choices. The structure is the command <<*If* followed by a !group! and a comparator, typically an '='. The item following the '=' is either a position (representing whether the precedent selection was the first, second, third, etc. choice presented) or a 'hard value' (the actual precedent choice made, precisely spelled, of course).

   So, beginning with line 4, values are set or more questions asked. In line 4, the initial If equation tests !Children! by comparing it to "=1", that '1' being position of the two choices regarding !Children! set in the preceding line (not the number 1).

   The symbols in parenthesis are optional, but 'best practice' (i.e., it will speed things up) suggests that they should be included. In line 4, the (#) indicates that a pure number is being set. In line 6, it indicates the number of choices that the group typically provides. So if 'NumChd' is more than zero, the question AllAdults is posed, otherwise, !AllAdults! is set to 1 (of 2 choices).


informationWe encourage anyone with more complex needs to contact us. Using a 'real world' need as a guide will help us to refine this function.

Multiple comparisons (two is the max at present) are possible by connecting two groups. Consider the following:




<<*If*!Size!="Custom"AND !Color! = "Custom",<<*AskOptions(radio)*!ExtraCharge!$100/$150/$200*>>,>>

<<*If*!Size!="Custom"AND !Color! ~ "Custom",<<*AskOptions(radio)*!ExtraCharge!$50/$60/$70*>>,>>

<<*If*!Size!="Custom" OR !Color! = "Custom",<<*AskOptions(radio)*!Shipping!$20/$30/$40>>,>>



In the above example, we used 'hard' (as opposed to positional) values for the comparisons.

'Legal' comparators


'~' ('not equal')

'#' ('includes'; used when multiple items can be selected, and you are checking to see if the named item was one of them.)  

'Legal' connectors:

'AND' or 'and'

'OR' or 'or'

'+' (math only)

'-' (math only)

  This example addresses what a manufacturing company might face in processing special orders. There are extra manufacturing charges and extra shipping charges associated with custom orders. Here the ~ (not equal) is illustrated.



<<*If*!Size!="Custom"AND !Color! = "Custom",<<*AskOptions*!ExtraCharge!$50/$60/$70*>>,>>

<<*If*!Size!="Custom"AND !Color! ~ "Custom",<<*AskOptions*!ExtraCharge!$100/$150/$200*>>,>>

<<*If*!Size!="Custom OR !Color! = "Custom",<<*AskOptions(radio)*!Shipping!$20/$30/$40>>,>>


Hints for setting up cascading optional blocks within the document.


If there are several levels of cascading, you may wish to set up your Optional text block in nests. That way, if a parent is never checked, the sub-parts are immediately discarded instead of Pathagoras waiting for a decision.


Created with Help & Manual 7 and styled with Premium Pack Version 2.70 © by EC Software