> For the complete documentation index, see [llms.txt](https://docs.rierino.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rierino.com/design/user-interface/uis/extended-scope/data-context.md).

# Data Context

Certain widgets and menus have access to data elements outside their scope, using data context

As Rierino allows use of highly sophisticated and nested data models with arrays and objects, it is sometimes necessary to refer to data elements not directly edited by a widget (for example an item editor filtering its list of values based on the value of another editor).&#x20;

Example use cases include Item Editor, Button Action, Handlebars Display, Attribute Array Editor widgets as well as Call Value API and Set Value actions.

Such widgets and menus use path expressions to access data with the following conventions:

| Path Expression | Description                                                                       | Example     |
| --------------- | --------------------------------------------------------------------------------- | ----------- |
| $               | Get current list entry data                                                       | $           |
| \_              | Get current record data                                                           | \_          |
| #               | <p>Get current locale data</p><p>(of closest localized editor)</p>                | #           |
| $\[EXPRESSION]  | Get a specific data element using JSON path from list entry                       | $label      |
| \_\[EXPRESSION] | Get a specific data element using JSON path from record                           | \_data.name |
| #\[EXPRESSION]  | Get a specific data element using JSON path from locale data                      | #text       |
| \[EXPRESSION]   | Get a specific data element using JSON path (widget selects list entry or record) | data.name   |

Where "list entry" refers to the current element within an array (e.g. specific row inside a table editor), "record" refers to the root aggregate being currently edited (e.g. current product record) and "locale data" refers to the contents of a parent localized editor for the currently selected locale. &#x20;

{% hint style="info" %}
It is also possible to use JMESPath expressions as \[EXPRESSION] in the form of =\[JMES].
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.rierino.com/design/user-interface/uis/extended-scope/data-context.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
