> For the complete documentation index, see [llms.txt](https://docs.eximee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/model-danych/edycja-modelu-danych.md).

# Data model editing

## Data model editor

To open the data model editor, select "Data model" on the application home screen in Eximee Designer

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2Fw2ToK6UAIPpnTfZaSFmi%2Fselect%2025-11-02%2020-31-22.png?alt=media&amp;token=1371af9f-912d-49cd-aff1-f12dd13450aa" alt=""><figcaption><p><em><strong>Figure 1.</strong> The "Data model" tab of the low-code application</em></p></figcaption></figure>

The data model editor is divided into three tabs:

* *Structure,* where we manage the model structure and fill in node parameters,
* *Data sources*, where we define and parameterize data sources,
* *Source*, where we edit the JSON that is the source representation of the model - a feature for advanced users.

{% hint style="info" %}
If your application does not yet have a data model, you can create one by clicking the "Initialize data model" button.
{% endhint %}

## Structure

The data model structure is presented as a tree in the left panel of the editor. Clicking a tree item expands its branch. Branches can also be expanded and collapsed using a separate button next to the node.

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2FpGYMk4FBEkGpE0Xms9bi%2Fselect%2025-11-10%2008-38-49.png?alt=media&amp;token=5485be84-12a8-49b6-bba7-5593fd335377" alt=""><figcaption><p><em><strong>Figure 2</strong>. Presentation of the data model structure</em></p></figcaption></figure>

Selecting a tree node automatically filters the nodes in the list on the right.

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2F9To3bLxOb2Te7yob6RE3%2Fselect%2025-11-10%2008-38-24.png?alt=media&amp;token=d410d36a-b3fd-4b1a-9661-fd4aac03a209" alt=""><figcaption><p><em><strong>Figure 3.</strong> Selecting a node in the data model editor</em></p></figcaption></figure>

At the top of the node list, the key that serves as the current view filter is displayed: *"client.surname"* in this case.

## Parameterization of model elements

### Node

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2FVs4n9VmkiFgDMjO4W6oh%2Fselect%2025-11-10%2012-54-06.png?alt=media&amp;token=eb961942-292f-4fb4-9e84-9b15053c8165" alt=""><figcaption><p><em><strong>Figure 3.</strong> Editing the model node</em></p></figcaption></figure>

In the model node editing section, you can edit the key and documentation (*"description"*) of the object. The object can also be marked as an array.

{% hint style="info" %}
Next to the object key there is a button that copies the key to the system clipboard.
{% endhint %}

The context menu contains an option to delete the node together with its descendants.

To add a field to a node, click the *"Add field"*.

### Field

The field section in the data model also allows you to specify a default value for the field.

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2FeouRbLetiQ4gRv7dmyE1%2Fselect%2025-11-10%2012-55-56.png?alt=media&amp;token=a32b215b-e4c5-4465-a803-ccc6588a1f30" alt=""><figcaption><p><em><strong>Figure 4.</strong> Field in the model</em></p></figcaption></figure>

{% hint style="info" %}
When the type catalog is configured, for a field key coming from that catalog the editor additionally shows a badge with the declared value type (text, date, date and time) or a "Array" badge for a repeated field. Details in the chapter [Field value type (typing)](/documentation/documentation-en/budowanie-aplikacji/model-danych/struktura-modelu-danych.md#rodzaj-wartosci-pola-typowanie).
{% endhint %}

### Data source

Clicking the data source chip or the pencil icon next to it opens a drawer with a list of data sources and the ability to edit their use (source order, source parameters, value mapping).

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2FywA0gWrX9LOPbUC2dzQO%2Fselect%2025-11-10%2012-48-36.png?alt=media&amp;token=e4298992-f3a3-4da9-9bc4-99aefeaac6d5" alt=""><figcaption><p><em><strong>Figure 5.</strong> Data source usage</em></p></figcaption></figure>

By default, for each **leaf** of the data model tree (that is, fields that do not have further subfields), the platform automatically adds a special data source of type **ValueMap**. This is a built-in source that stores the field value in the application's memory structure (the so-called application value map) - it can be treated as the equivalent of a session variable storing data in the context of the entire application (form). The default ValueMap mapping uses the full key path of a given field as the key in this internal map (e.g. for the field `country` located inside the object `personalData` the key in the value map will be `personalData.country`). As a result, once form fields are bound to the model, **there is no need to write additional code to save the entered data** — the value entered by the user will be automatically placed under the appropriate key in the model's memory.

#### Data source - defensive logic and empty values

Data model sources cannot assume a deterministic order of invocation or that all input data is already available. The platform may call the source earlier (e.g. when determining the multiplicity of dynamic form or model sections), even if the data field is not yet used directly in the form or process.

Therefore, data sources must be designed defensively: in the absence of data, incomplete data, or data that is "not yet ready", they should return safe, empty values (null, empty list, empty object) and not raise exceptions. An empty value means: at this stage I cannot determine the value, and it allows subsequent sources to act in the cascade, especially default sources (e.g. ValueMap or default values on the field definition).

Exceptions should be reserved only for real technical errors (e.g. communication errors or incorrect configuration) that should interrupt the system's operation (form interruption, process transaction rollback, etc.), not for transient process states.


---

# 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.eximee.com/documentation/documentation-en/budowanie-aplikacji/model-danych/edycja-modelu-danych.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.
