Iterators and other Looping Blocks - WorkView - Foundation 24.1 - Foundation 24.1 - Ready - OnBase - Premier - external - Premier

WorkView

Platform
OnBase
Product
WorkView
Release
Foundation 24.1
License
Premier

DependentObjects

This is an easy way to iterate over “child” objects for simple relationships. Uses the context of the current object to identity related objects of a specified class, where the related attribute also may be optionally specified. Example (in an Invoice object context):

<<DependentObjects: LineItems, Invoice>>

<<End>>

Filter

CreateFilter

FormattedFilter

See Filters.

RelatedObject

Defines a template block that is executed in the context of the named related class object. If the named related attribute is resolved for the current executing context, this block is executed., otherwise it is skipped. Example:

<<RelatedObject: Physician>>

<<!- The Physician is the current object -->>

<<End>>

IterateNameValueMap

Executes the contained template block once for each name/value pair in the named map. A sort order for these values may be specified by adding a parameter after the map name. An optional sort order may be specified by the token “Name” or “Value”. A minus sign immediately preceding the sort tokens indicates a descending sort. If no sort is specified, values are provided in the order they are added to the map (in “natural” order) Example:

<<IterateNameValueMap: AmountByStatus, -Value>>

<<@Name>>

<<@Value>>

<<@Percentage>>

<<End>>

See Name-Value Maps for a full example.

IterateNameValueMapMatrix

A name value map matrix is simple a collection of name value maps that are determined based on objects that have specific attribute values that are common across all of the objects. Iterate Name Value Map Matrix

IterateDocumentFolder

Requires that the current object context is a WorkView object. This will iterate over all documents in the named folder for the current object. If no name is specified, the STATIC document folder is assumed. Example:

<<IterateDocumentFolder>>

<<@itemnum>> - <<@itemname>> - <<@itemdate>>

<<End>>

IterateEventLog

Executes the contained template block once for each log entry found for the current WorkView object. Example:

<<IterateEventLog>>

<<@ID>>

<<@ObjectID>>

<<@EventDate>>

<<@UserName>>

<<@Description>>

<<End>>

IterateObjectHistory

Executes the contained template block once for each change history entry found for the current WorkView object. Example:

<<IterateObjectHistory>>

<<@ID>> -

<<@ObjectID>> -

<<@AttributeName>> -

<<@TransactionDate>> -

<<@UserName>> -

"<<@StartValue>>" -

“<<@EndValue>>”

<<End>>

IteratePortfolioRelation

Iterates over the results of the named Workflow Portfolio Relation. Results can be either WorkView objects or OnBase documents. Example:

<<IteratePortfolioRelation: AP - Related Invoice Docs>>

<<End>>

IterateStringParts

Parses the specified string into parts, separated by the specified delimiter, then iterates the contained template block for each part.

The following example will break the attribute value of Scores into individual strings, splitting by commas (the default delimiter). The loop will be processed once for each string part accessed by the attribute name @Part:

<<IterateStringParts: @TestScores>>

<<@Part>>

<<End>>

You may also specify a delimiter other than a comma, where “:” is the delimiter in this example:

<<IterateStringParts: @TestScores, “:”>>

<<@Part>>

<<End>>

Other delimited examples include:

  • “,” - split by commas

  • “\r\n” - carriage return + linefeed

  • “\t” - tab

  • “|,” - splits by these 2 characters.

XMLDocument

Creates an XML document and loads it from the specified source identified by file name. The contained template block is execute ONCE if the document loads successfully. Use IterateXMLNodes to query and iterate over contained parts.

IterateXMLNodes

This tag is only available inside an XML document block. This executes the contained template block once for each node found in the XML document that matches the named pattern. Example:

<<XmlDocument: E:\sampledata.xml>>

<<IterateXMLNodes://List/Region>>

<<@Region>>

<<IterateXMLNodes:Territory_Rep>>

<<@Territory_Rep>>

<<End>>

<<End>>

<<End>>

ObjectList

Executes the contained template block once for each object in the current data source. Object lists are set as the current context by the API. Object types supported are WorkView objects, Entity Items, Element (as an Element List) and a List or Array of plan objects, assuming each item in these collections is of a supported type. Example:

<<ObjectList>>

<<@PropertyName>>

<<End>>