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.


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



  • 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:


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"'/>


If the source and target types are different, such as copying from an EnsLib.HL7.MessageOpens in a new tab to an EnsLib.EDI.XML.DocumentOpens in a new tab, 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:

  • Separators” in the reference section of the Ensemble HL7 Version 2 Development Guide

  • Separators” in the reference section of the Ensemble ASTM Development Guide

  • Separators” in the reference section of the Ensemble EDIFACT Development Guide

  • Separators” in the reference section of the Ensemble X12 Development Guide


Here is a BPL example:

<if condition='source.{MSH:9.1}="BAR"'>

Here is a DTL example:

<transform targetClass='EnsLib.HL7.Message'
  <assign property='target.{PR1grp(1).PR1:Anesthesiologist.nametype}'

Here is an example from a business rule:


Here is an excerpt from a search table:

<Item DocType="" PropName="MSHControlID"
                 PropType="String:CaseSensitive" >{1:10}</Item>
FeedbackOpens in a new tab