OneList data binding is capable of displaying the following information:
- Static text
- Source data property
- Combination of static text and source properties
How to create the binding expression
- Select field or click on the button in the Source Properties pane;
- Find the property in the tree and select it to add to the binding. Note: only the properties that are valid for binding are shown in the tree.
- Continue the above step to bind multiple properties to the same field.
- Optionally, edit the binging expression to
- Change the order of the properties;
- Add static text;
- Add formatting;
Syntax of the binding expression
Path of the source property is enclosed with {}. The text including the {} braces are replaced with the value of the property. Texts outside of the {} are static and not changed.
Feature | Expression | Description | Example |
---|---|---|---|
Static text | Any text | Display a static text. | Sourcen/a Expression => DisplayHeader => Header |
Single properties | {Property} | Display the value of the bound source property. | Source{ "PO_ADDRESS": { "CITY1": "Sydney" } |
Multiple property | {Property1} {Property2} | Display the concatenation of the value from multiple properties. | Source{ "CostCentreName": "Sales Office" Expression => Display
|
Combination of static text and properties | Text1 {Property1} Text2 {Property2} | Combining static text (including space) and properties to display more descriptive information or complete sentences. | Source{ "UnitPrice": 10.00 "UoM": "EA" Expression => Display
|
Date and time format |
| Display date and time in specific format. More detail of date & time format can be found at: https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings | Source{ "ModifiedOn": "2019-06-30T10:10:00+00:00" } Expression => Display
|
Number & currency format | {Property:#.00} {Property:#.c} | Display number in specific format. More detail of number format can be found at: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings | Source{ "Weight": 12.50, "Amount": 1500.50, } Expression => Display
|
Array element | {ArrayProperty[Index]} {ArrayProperty[Index].Property} | Display the text in an string array at the specific index, display a property of the array element at the specific index. Note: index starts from 0. | Source{ "Items": [ {"Title":"Item 0", "Value":0 }, {"Title":"Item 1", "Value":100 }, {"Title":"Item 2", "Value":200 } ] } Expression => Display
|
JSON path query | {ArrayProperty[?(@.Title='the title')].Value} | Evaluate the JSON Path Query at runtime and display the selected value. More detail about JSON Path can be found at: https://restfulapi.net/json-jsonpath/ | Source{ {"Title":"Item 0", "Value": 0 }, {"Title":"Item 1", "Value": 100 }, {"Title":"Item 2", "Value": 200 } ] } Expression => Display
The above expression selects the element in the Items array where the element's Title property is 'Item 2' and binds to the element's Value property. |