Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: native rendering datasource information. #158

Merged
merged 3 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
 


## 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.