Skip to content

Commit

Permalink
chore: native rendering datasource information. (#158)
Browse files Browse the repository at this point in the history
* add datasource information to rendering documentation

* add datasource information to rendering documentation- changes after review

* Missing bullets added

---------

Co-authored-by: Przemysław Springer <[email protected]>
  • Loading branch information
LukaszParala and PrzemyslawSpringer authored Jan 24, 2024
1 parent 09abdb7 commit dc1b4c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion native-rendering/documents-designer/data-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ or the bracket notation:
```code
$['shipment']['tracking_number']
```

For each document you need to select DataSource property value:
* **package** - prints a label for each package in the shipment;
* **shipment** - prints only one label for the whole shipment.

![Data Source](./images/data-source.png)
&nbsp;


## Restrictions
1. Root element starts from `$.` or `.`
2. Nested object path have to start from `.` If nested object starts from `$.` it means reference to root element. In this case no relation will be considered.
Expand Down Expand Up @@ -83,7 +92,7 @@ $.shipment.metadata['account.number']

#### Current package reference

You can also reference to the current *Package* using prefix `@`
If you select **package** as DataSource, you can also refer to the current *Package* using prefix `@`

```code
@package.weight_details.weight_in_grams
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dc1b4c7

Please sign in to comment.