docs.intersystems.com
Home  /  Application Development: Using EDI Documents in Productions  /  Using Virtual Documents in Productions  /  Syntax Guide for Virtual Property Paths  /  Curly Bracket { } Syntax


Using Virtual Documents in Productions
Curly Bracket { } Syntax
[Back]  [Next] 
InterSystems: The power behind what matters   
Search:  


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