> For the complete documentation index, see [llms.txt](https://university.gonexa.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://university.gonexa.fr/doc/en/advanced-features/tag-extensions/truncate-text-field.md).

# Partially display a text field

Choose the number of characters of a field to display

The "Partial display" feature is very useful for truncating a text field

**How does it work?**

The `{!label|champ(X,Y)}` syntax extracts a **substring** from a text field.

**Parameters:**

* `X` = start position (starting from 0)
* `Y` = number of characters to display

The "Partially display text" feature in the Gonexa Assistant generates this syntax automatically, so you don't have to write it manually.

* From the assistant, go to the tag you want to truncate
* Using the "...", click "Partially display text"
* Set the number of characters to display and, under "Display from", select "the beginning" or "the end"
* Then copy and paste the tag into your document where you want it

![Assistant: partially display text](https://content.gitbook.com/content/U1Chwyf7Cc7FN9BiEh0V/blobs/ws0IoyKnNDN95Dn1C1y4/extensions-balises-5.png)

{% hint style="success" %}
**Example**

A product code field contains 5A133.\
`{!obj|champ(0,2)}` returns 5A, and the tag `{!obj|champ(2,3)}` returns 123
{% endhint %}

{% hint style="danger" %}
**Warning**

This feature is limited to text fields that contain only letters or digits, and whose total number of characters is known
{% 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://university.gonexa.fr/doc/en/advanced-features/tag-extensions/truncate-text-field.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.
