'Cumulative' & 'Cumulative,and' Modifier

   Pathagoras provides an alternative approach to using the <<Repeat>> command. We call it the Cumulative modifier for Options text. When a choice is made, it 'accumulates' all lower choices. More below.

  With 'Repeats', you start with a section of text, perhaps including variables. When the document is processed, you will be asking Pathagoras to duplicate the text X number of times, and appropriately increment any variables within the duplicated text.

   With the 'cumulative' modifier to Options blocks, you pre-list the greatest number of options reasonably foreseeable in the options block. When the document is processed, you will be asked for the 'highest' element you want. The selected and all lower positioned elements are retained. Any remaining Options above the selected position are deleted.

"Cumulative"

  The 'cumulative' modifier 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.

   With 'cumulative', you would 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 'above' the choice are deleted. Proper commas and connectors can be inserted with the 'cumulative,and' modifier so that the result is a proper 'sentence.'

   Example: Let's say you are creating a Will. As you are composing the 'family' clause, you pre-list the maximum number of children 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]>>

"Cumulative, and" (used in the more 'prose' settings)

<<*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 since the (cumulative,and) modifier is being used.
informationNOTE: If you have prepared an Interview including <<*AskOptions* . . .>> command for the related !group!, the proper modifier for the interview *Ask* is "(radio)". This is to insure that only one choice can be 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 need 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]>>

Tables

The cumulative modifier can be used with tables. Each row of a table is deemed an option. (With tables, no slash is needed between the rows of the table. Slashes are still needed between the prompts. Prompts are mandatory if you are using table rows as containers for the options.

<<*Options(cumulative)*Header/One Child/Two Children/Three Children/Four Children/Five Children*

Child Name

Age

Born in Year

[Child-Name@1]

[Child-Age@1]

[Child-DOB@1]

[Child-Name@2]

[Child-Age@2]

[Child-DOB@2]

[Child-Name@3]

[Child-Age@3]

[Child-DOB@3]

[Child-Name@4]

[Child-Age@4]

[Child-DOB@4]

[Child-Name@5]

[Child-Age@5]

[Child-DOB@5]

>>

The 'None' Option

   Sometimes you don't want any of the options. E.g., 'None' may be the correct choice for the 'How many children?' question. Pathagoras process the "None" choice when it is the only one chosen (by deleting the others), but when a 'higher' choice is made, excludes/excises it from display when anything above it is chosen. 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 approach would be to use prompts, the first one being a prompt that suggest 'none', and the first 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]>>

   Along the same lines, if you use AskOptions in a 'top of document' interview, you might use:

<<*AskOptions*!accts!No Accounts/1 Account/2 Accounts/3 Accounts/4 Accounts/5 Accounts*>>

 and in the body of the document:

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

Note in the above two examples, you don't use 'none' as an 'in body' choice -- just a slash.

The 'cumulative' argument is only used in body text.

Don't forget the groupname if you use AskOptions.

 

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