'AskRepeat' value for <<*Options*. . .>>

EXCEPTION TO THE "POSITION" RULE" Normally, !grouped! elements are processed by ‘position’. Whether you select the 1st member of the group or the 50th, the same ‘position’ of other members of the group is returned as the desired value.

   However, when a !groupname! of a <<*Repeat* . . .>> (or <<*AskRepeat*. . .>>) block is shared with an <<*Options* . . .>> block, the selected option is processed based on an analysis of the actual repeat number provided.

  Zero: If the ‘repeat’ number is 0, the choice text occupying position 1 of the <<*Options*>> block is processed.  

  One: If the ‘repeat’ number is 1, the choice text in position 2 of the <<*Options*>> block is processed.

  Two or more: If the ‘repeat’ number is 2 or higher, the third (and last) choice of the <<*Options*>> block is processed.

  The logic behind this operation tracks the noun/verb pairings used in the English language:

  If there are ‘none’ of something, the plural of the verb is used to describe this ‘nothingness.’

  If there is 'one' of something, the singular is used.

  If there are '2 or more', the plural is used.

  So: “There are no children. There is one child. There are 3 children.”

   Of course, the actual text (if any text is provided at all) can vary greatly based on the number of children, shareholders, quantity ordered, etc., so think expansively.

  So, the instruction is this: if the same !groupname! is used by both a <<*Repeat/AskRepeat*>> block and an <<*Options*>> block, simply set out in the *Options* block the appropriate '0', '1' and '2+', possibilities, separating each choice with slashes.

    Let's illustrate with an example:

<<*AskRepeat*!Children!How many children?*>>        

<<*AskRepeat*!Bene!How many beneficiaries?*>>                      

(The above would appear at the top of the document. Pathagoras always processes 'Ask' blocks first.)

 

Last Will and Testament of

[Testator Name]

. . .

A. Family: <<*Options*!Children!*I have no children/I have one child whose name is [Name of Child]/I have <<*Repeat(return,two)*!children!*>> children and their names are <<*Repeat(and)*!children!*[Name of Child]>>>>.

. . .

<<*Options*!Children!*/

G. All trust assets shall be distributed to my child named in paragraph A if that child is alive at the time of my death. If my child is not alive at the time of my death, but has surviving descendants, the share that would have gone to such child shall be distributed to such child’s descendants, per stirpes./

G. All trust assets shall be distributed to each child named in paragraph A if that child is alive at the time of my death. If a child of mine is not alive at the time of my death, but has surviving descendants, the share that would have gone to such child shall be distributed to such child’s descendants, per stirpes.>>

<<*Options*!Children!*

H. All assets shall be distributed to <<*Repeat(and)*!Bene![AltBenef Name]  residing at [AltBenef Address]>>, if that beneficiary is alive at the time of my death<<*Options*!Bene!*// ,in equal shares>>. If a named beneficiary should not survive me, such shares shall be distributed to such beneficiary’s descendants, per stirpes./

H. If my child named in paragraph A, and no descendant of such child, shall survive me, all assets shall be distributed to <<*Repeat(and)*!Bene![AltBenef Name]  residing at [AltBenef Address]>>, if that beneficiary is alive at the time of my death<<*Options*!Bene!*// ,in equal shares>>. If a named beneficiary should not survive me, such shares shall be distributed to such beneficiary’s descendants, per stirpes./

H. If no child named in paragraph A, and no descendant of any such child, shall survive me, all assets shall be distributed to <<*Repeat(and)*!Bene![AltBenef Name]  residing at [AltBenef Address]>>, if that beneficiary is alive at the time of my death<<*Options*!Bene!*// ,in equal shares>>. If a named beneficiary should not survive me, such shares shall be distributed to such beneficiary’s descendants, per stirpes.>>

  informationIf there is no appropriate text to display for one of the choices, you will still need the slash. It serves as a 'no text' holding spot. See just above Paragraph G ('0' children requires no text), and see in Paragraph H near the !bene! group ((there is no ‘equal shares’ possibility for ‘0’ or ‘1’ beneficiary). If all you are doing is added an 's' to make a noun plural, the same concept applies. Not sure the ending for one or more (or no) apples.Assuming a groupname value has been assigned to 'apples', use this:

 Apple<<*Options*!fruit!*s//s>>.

(Mentally run through the assignment for 'no apples', 'one apple', 'fifteen apples'.)

"But what if I need separate paragraphs based on all of possibilities (i.e., 3, 4, 27, etc.) reflected in the *RepeatAskRepeat* answer?" Sorry, this tool does not address that situation. We are working on a '<<*Options(choose)* . . .>> tool that will allow you to process a specific result for a specific number. Stay tuned. (And if you have the need for this, write to us. You can help beta test it.)  There is one exception to this: If the (cumulative) argument, as in <<*Options(cumulative)*!groupname!* . . . .>>, is being used in the document, the  <<*Repeat* value will be first applied to the cumulative, at its actual value. So if '5' is the repeat value, the first 5 choices will be accumulated in the normal 'cumulative' fashion. Any 'non-cumulative' <<*Options* . . . >> will be processed as described above (0, 1, 2+).

  informationNOTE: By design, Options blocks will always be processed before Repeat Blocks. This is so even when the Option block is nested within the Repeat block. (In any program, there must always be a processing order or precedence. Here, with the exception described immediately below, the order is 'Options and Optional' blocks first, and then Repeats.)  If you want the document's Repeat blocks to process first, simply present it as an 'AskRepeat' prompt at the top of the document. This is shown in the example.

If you see your Repeat blocks automatically processing when it bears the same groupname as an Options block, that is because of the rule in the above paragraph. Here's what's happening. When the values for the Options block are presented, and you make a selection, the value for the !groupname! is immediately set. Then, when the Repeat block is encountered, its value is 'known' to Pathagoras and the Repeat block is repeated the 'appropriate' number of times, based on the Options position selected.

Another note, tying (hopefully) all of the above together and reiterating why you will probably want to use AskRepeat:

(This is a bit redundant, but it is worthy of repeating.)

   Let's say you have the following (you can copy and paste this into a Word document and test it yourself):

<<*Options*!Children!*no children./one child, [CHILD NAME] (“[Child Referred to Name]”), born on [Child DOB]./<<*Repeat*!children!Return*one>> children:

<<*Repeat*!children!*[CHILD NAME] (“[Child Referred to Name]”), born on [Child DOB]

>>>>

 

   If you choose the 3rd choice, you notice that you are not given the opportunity to provide the actual number of children. That's because the groupname !children! was set to 3 when you answered the <<*Options*. . .>> question. Pathagoras had no 'need' to ask again for a value for !children!. It 'knew' it was 3 (even though that may not really be the case).

  The best workaround is to place an <<*AskRepeat*!children!How many kids?*>> question. Then, no matter the number, Pathagoras will handle the situation correctly.

   Very good alternative: If you choose not to go the <<AskRepeat* . . .>> route, just change the name of one of the !groupnames!. Since no value was previously assigned, Pathagoras will ask for a number.