Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Sometimes you will need whole sections of the document to repeat. For example you might want a separate signature block for each participant. Each signature block will print the participant name and address under the signature lines. You can also create lists and tables from custom data sets defined as "multi-row".

...

Examples of data sources:

When pulling merge fields form a participant: Action_participant.ParticipantType

In this case ParticipantType is the name of the participant type that you are pulling information on. For example a "Client", "Lawyer" or "Customer".

When pulling merge fields form a multi-row data collection: Data_Collection_Name

The name of the data collection that the fields you are repeating will be found under. 

When Pulling information from a Sales/Purchase document (such as an invoice): SP_LineItems

When the document generates it will look at the data_source (see merge field list) to determine how many times to repeat. It will then substitute the * character in the repeating clock for the number of the repeat block.

Info
NOTE: It is important to set the record number to an asterisk within the repeat block (rn=*)

Example:

...

Tip
titleTip
If you want to get all the participants in an action, regardless of type, then use "All__Participants" (with a double underscore between All and Participants).
[[*REPEAT|data_source=action_participant.all__participants|*]]
[[FirstName|pt=All__Participants|rn=*]], [[ParticipantTypeName|pt=All__Participants|rn=*]]
[[*REPEAT|END*]]
Info

NOTE: "action_participant" in the data_source specification needs to be in lower case.

Full List of Data Sources that can be used with Repeating Blocks of Text

The availability of the data sources will depend on what type of document template is being generated, however below is a full list of possible data sources and how to type them.

 

  1. action_participant
  2. receipts
  3. sale_purchase_payments
  4. checks
  5. action_sale_payment_schedule
  6. deposit_slip_items
  7. sp_lineitems
  8. trust_receipt_action
  9. any multi-row data-collection name

Sorting Participant Data in Repeat Blocks

The only sort option we have for participants is "sort=name". Name must be in all lowercase.

Example:

[[*REPEAT|data_source=action_participant.Client|sort=name|pt=Client|direction=asc|*]]
[[Field|rn=*|pt=Client|]]
[[*REPEAT|END*]]

Sorting Multi-Row Custom Data Elements in Repeat Blocks

...

  • Specific Columns: A comma-separated list of columns in the order you require e.g. "sort=0,4,2" will sort by the first column then by the fifth and then by the third column
  • Range of columns: "sort=0-3" will sort by the first 4 columns in order
  • All columns: "sort=all" will sort by the order of the columns in the list. This is the easiest way to do it.
  • The name of the field can be used instead of the column number e.g. sort=my_custom_field_name

...

  • "Direction=asc" will sort ascending order (A-Z)
  • "Direction=desc" will sort descending order (Z-A)

Example:

[[*REPEAT|data_source=Equipment|sort=Make|direction=desc|*]]
[[Equipment_Location|rn=*]] [[Equipment_Make|rn=*]][[Equipment_Model_Num|rn=*]]
[[*REPEAT|END*]]

Creating Tables using Repeat Blocks

You can create table rows for each repeat block by placing the repeat clock inside a regular DOCX table in MS Word. However problems sometimes occur because it is difficult to see where the (invisible) row markers start and end. The key to keeping all the columns together is to use the "tablerow" merge field option in the first REPEAT directive.

Example

...

Info

See updated article on Actionstep Help Center: https://support.actionstep.com/hc/en-us/articles/360050760093-Repeating-Blocks-of-Text