> 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/advanced-features/tag-extensions/truncate-text-field.md).

# Afficher partiellement un champ texte

Choisissez le nombre de caractère d'un champ

La fonctionnalité "Affichage partiel" vous sera grandement utile pour tronquer un champ de type texte

**Comment ça fonctionne ?**

La syntaxe `{!label|champ(X,Y)}` permet d'extraire une **sous-chaîne** d'un champ texte.

**Paramètres :**

* `X` = position de départ (en partant de 0)
* `Y` = nombre de caractères à afficher

La fonctionnalité "Afficher partiellement le texte" dans l'Assistant Gonexa génère automatiquement cette syntaxe sans avoir à l'écrire manuellement.

* Depuis l'assistant, accédez à la balise que vous souhaitez tronquer
* Via les "..." cliquez sur "Afficher partiellement le texte"
* Définissez le nombre de caractères à afficher et dans "Afficher à partir" cochez "du début" ou "de la fin"
* Copiez-collez ensuite la balise dans votre document à l'endroit souhaité

![Assistant : afficher partiellement le texte](https://4198981723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTYUzkIngX1MnHE8kOJDR%2Fuploads%2F49W1JhfsiBGPJ7feFsyJ%2Fextensions-balises-5.png?alt=media)

{% hint style="success" %}
**Pour exemple**

Un champ de code produit qui contient 5A133.\
`{!obj|champ(0,2)}` = pour renvoyer 5A et la balise `{!obj|champ(2,3)}` pour renvoyer 123
{% endhint %}

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

Cette fonctionnalité est limitée aux champs de texte ne contenant que des lettres ou des chiffres, et dont le nombre total de caractères est connu
{% 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/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.
