Data member expression examples
Same-level data member reference
Input
'The document Id is {DocumentId}.'
Output
'The document Id is 929bdc15-79d8-4a1f-9467-c237f040939d.'
Breakdown
'The document Id is '{DocumentId}- Evaluates to
"929bdc15-79d8-4a1f-9467-c237f040939d" '.'
Assuming that the domain object has:
data member 'DocumentId' equal to '929bdc15-79d8-4a1f-9467-c237f040939d'.
Referencing data members deeper
Input
'The customer is {Customer.Party.PartyName} and its number is {Customer.Number}.'
Output
'The customer is John Doe and its number is C12345.'
Breakdown
'The customer is '{Customer.Party.PartyName}- Follows the reference path:
Customer.Party.PartyName
- Evaluates to
'John Doe
- Follows the reference path:
' and its number is '{Customer.Number}- Follows the reference path:
Customer.Number
- Evaluates to
'C12345'
- Follows the reference path:
'.'
Assuming that the domain object has:
data member 'Customer' with members 'Party.PartyName' equal to 'John Doe' and 'Number' equal to 'C12345'.
Including a format specifier
Input
"The customer is {Customer.Party.PartyName:de}."
Output
"The customer is John Doe."
Breakdown
'The customer is '{Customer.Party.PartyName:de}- Follows the reference path:
Customer.Party.PartyName
- Evaluates to
MultilanguageStringobject - Format specifier finds
:deand applies it. - Returns
'Max Mustermann'
- Follows the reference path:
'.'
#Error# Not existing reference
Input
'The customer is {Customer.Name}.'
Output
'The customer is #Error: Attribute 'Name' not found#.'
Breakdown
'The customer is '{Customer.Name}- Follows the reference path:
Customer.Name--> Fail. Reference doesn't exist.
- Returns error.
- Follows the reference path:
'.'