Skip to main content

Curly Bracket { } Syntax

Describes how to use curly bracket { } syntax to access virtual properties.

Where Applicable

You can use this syntax in business rules, search tables, search filters, BPL elements (other than <code> and <sql>), and DTL elements (other than <code> and <sql>).

For curly bracket syntax to resolve, the message structure must be known. If the message structure is unknown in the current context, use square bracket [ ] syntax instead, if possible.

Details

To use curly bracket { } syntax to access a virtual property, use the following syntax:

message.{myVirtualPropertyPath}

Where:

  • message is a variable that refers to the current message. The name of this variable depends upon the context.

  • myVirtualPropertyPath is a virtual property path as described earlier in this reference.

The preceding syntax is equivalent to the following method call:

message.GetValueAt("myVirtualPropertyPath")

Curly bracket {} syntax is simpler and so is commonly used where available.

Wholesale Copy

When you are using curly bracket {} notation in BPL or DTL, you can copy whole segments, groups of segments, or whole composite fields within a segment. To do so, omit the field part of the virtual property path (as well as the colon separator). Thus, the following DTL <assign> statements are all legal:

<assign property='target.{MSH}' value='source.{MSH}' />
<assign property='target.{DG1()}' value='source.{DG1()}' />
<assign property='target.{DG1(1):DiagnosingClinician}' value='"^Bones^Billy"'/>

Note:

If the source and target types are different, you cannot use the wholesale copy to assign subproperties, even if the structures appear to be parallel. For such a copy, you must assign each leaf node of a structure independently and add a For Each action to process iterations.

The last line of the previous example uses the caret (^) as a component separator character. For details specific to each EDI format, see:

FeedbackOpens in a new tab