'Cumulative' & 'Cumulative,and' Argument

   Pathagoras provides an easy to implement alternative approach to the <<Repeat>> command. We call it the 'Cumulative' argument. Simply put, instead of repeating a designated block of text (and asking Pathagoras to increment variables within the block), the desired text is 'pre-typed' into the document. When a 'cumulative' choice is made (typically a number of 'something'), Pathagoras retains the listed choices at and below that number, and deletes the higher ones.

   This gives you a bit more control over the result. It does take up more space in the document, but some users have said it makes the document clearer to end-users.


  The 'cumulative' argument to the <<*Options*>> command is a great alternative to the Repeats command and to other alternatives which involve listing of sequentially larger and longer choices. (And if 'higher' choices involve use of different language, and therefore Repeats won't do the job, the cumulative approach is the solution.)

How to:  Prepare a list of choices. Each choice reflecting an increasingly higher count of a specific variable (plus surrounding text). Think 1 child, 2 children, 3, etc.). However, each choice anticipates including all of the lower choice. If you select item 4 from the list, all selections up to and including 4, will remain in the document. All items 'higher' than the choice are deleted.

The 'call': Simply add the '(cumulative)' argument after the <<*Options command (within the closing '*'. See example below.


         Let's say you are creating a Will. As you are composing the 'family' clause, you pre-list the maximum number of children, and the variables you want to use for each, you are likely to need:

<<*Options(cumulative)*One child/Two children/Three children/Four children/Five children/Six children*

[Child1Name] born [Child1DOB]/

[Child2Name] born [Child2DOB]/

[Child3Name], born [Child3DOB]/

[Child4Name], born [Child4DOB]/

[Child5Name], born [Child5DOB]/

[Child6Name], born [Child6DOB]>>

        redarrowYou can copy the above and paste it into a Word document. Press <Alt-P> to process it.
(The same applies to all examples on this page.

Additional features:

The "cumulative, and" argument

Use <<*Options(cumulative,and)* . . . >>when a more 'prose' result is desired. Proper commas and connectors can be inserted with the 'cumulative,and' modifier so that the result is a proper 'sentence. Example:

<<*Options(cumulative,and)*One child/Two children/Three children/Four children/Five children/Six children*[Child1Name] born [Child1DOB]/[Child2Name] born [Child2DOB]/[Child3Name], born [Child3DOB]/[Child4Name], born [Child4DOB]/[Child5Name], born [Child5DOB]/[Child6Name], born [Child6DOB]>>

   When the command is processed, and you select (for example) 'Four children', all text blocks up to and including your choice will be inserted. Commas and a final 'and' connector will be inserted as appropriate.
informationNOTE: If you have prepared an Interview including <<*AskOptions* . . .>> command for the related !group!, the proper aargument for the interview *Ask* is "(radio)". This is to insure that only one choice is made when the Interview is presented.

So for the above example, in the Interview section, use

<<*AskOptions(radio)*!cdn!One child/Two children/Three children/Four children/Five children/Six children*>>

The body text (which should not include the prompt text) can be simply:

<<*Options(cumulative,and)*!cdn!*[Child1Name] born [Child1DOB]/[Child2Name] born [Child2DOB]/[Child3Name], born [Child3DOB]/[Child4Name], born [Child4DOB]/[Child5Name], born [Child5DOB]/[Child6Name], born [Child6DOB]>>

The 'cumulative,terminal' argument

Use <<*Options(cumulative,terminal)* . . . >> if your choices consist of a series of elements that always require the inclusion of the final element. E.g.,

<<*Options(cumulative,terminal)*Your initial payment will be [Amount], due on [Due Date];/

Your second payment will be [Amount], due on [Due Date 2];/

Your third payment will be [Amount], due on [Due Date 3];/

Your fourth payment will be [Amount], due on [Due Date 4];/

Your fifth payment will be [Amount], due on [Due Date 5];/

Your final payment will be the full remaining balance, due on [Due Date Final]>>


The 'None' choice:

There will be situations when you won't want any of the options. For example, For example, 'none' may be the correct choice for a 'How many children?' question. Pathagoras will recognize a "None" choice when it is the only one chosen (by deleting the others), but  when a 'higher' choice is made, will exclude 'none' from being displayed. So this is an appropriate and functional expansion of an above example:

<<*Options(cumulative,and)*!cdn!*None/[Child1Name] born [Child1DOB]/[Child2Name] born [Child2DOB]/[Child3Name], born [Child3DOB]/[Child4Name], born [Child4DOB]/[Child5Name], born [Child5DOB]/[Child6Name], born [Child6DOB]>>


    A similar result can be accomplished using prompts in the Options equation, the first prompt suggesting 'none', and the first body-text selection being just a slash (indicating 'no text'). E.g.,

<<*Options(cumulative)*No Accounts/1 Account/2 Accounts/3 Accounts/4 Accounts/5 Accounts*/[Account #1]/[Account #2]/[Account #3]/[Account #4]/[Account #5]>>


Allowable text to trigger the 'None' option:

None (the word 'None')

No . . . (e.g., 'No children')

There are no . . . (e.g., 'There are no children')

Rules and Limits:

The maximum number of elements you can process with the 'cumulative' argument is 9. Use <<*Repeat* if you need more than 9 elements.

Don't forget to use a groupname if you use <<*AskOptions* . . .>> to trigger a cumulative call.

The 'cumulative' argument is only used in body text. It cannot be used as part of an <<*AskOptions* . . .>> interview.

If an <<*AskRepeat* question triggers an <<*Options* response to a table containing listed items (names of children, names of directors, etc) , and if the table has a header row that shouldn't be considered in the 'count' of rows, you can use <<*Options(cumulative,header)*!groupname!* No other administrative text should follow the !groupname!. (Remember, the !groupname! already has a value.)