> 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/getting-started/conditional-display/simple-condition-examples.md).

# Simple display condition examples

Find several pre-designed simple condition templates to reuse and customize.

**Use cases**

Find several pre-designed simple condition templates to reuse and customize.

## Popular simple conditions

Conditions can be based on a main object, a parent object, a child object, a checkbox, a currency or a picklist, and can display text, a number, a static or dynamic image, a pictogram, a table, other tags or nothing at all.

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

A tag cannot be based on a rich text field or on a date.

The expected value cannot be an image or a pictogram. It must strictly match the value returned by Salesforce at generation time (e.g. "€0.00" and not 0 or null…).

Any difference, however small (format, symbol, space, capitalization...), will prevent the condition from working correctly.
{% endhint %}

## Example condition template

**RESOURCES**

Get the simple IF conditions template to download pre-made example conditions that you can customize.

[Download](https://cdn.prod.website-files.com/6266bdee7bba3ff58801d972/6a5f5d7c097ebc9c20d6a3a1_6a5e266e707fe4435c056be5_Exemple%20de%20conditions%20Simples.docx)

## Popular condition examples

### Display a T\&C page if a box is checked, otherwise nothing

Assuming you already have a template, follow these steps:

* Make sure you have a main object and a child object configured
* Open the Assistant from the document template
* Find the checkbox field to which you want to add a condition
* Click the 3 small dots and add a condition
* Enter "0" as the expected value
* In the text if true, write a word such as T\&C, for example.
* In the text if false: leave it empty
* Copy the condition
* From your document template, open the menu to insert a field via "Insert/Field" or from "Quick Parts" > "Field..."
* Paste the condition into the editable area and confirm
* Select the condition or the entire document (Ctrl + A) and right-click "Toggle Field Codes" to open the condition in its raw format:

```
{ IF "{!Quote|CGV_cochees__c}" = "true" "CGV" "" MERGEFORMAT }
```

* In the open condition, replace the text "CGV" with your T\&Cs and customize the layout as you wish

![Inserting the T\&Cs in the condition](https://content.gitbook.com/content/U1Chwyf7Cc7FN9BiEh0V/blobs/lpZQTpAF2XPneKkTvM8Z/27-04-condition-cgv.gif)

![T\&C condition opened in Word](https://4198981723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTYUzkIngX1MnHE8kOJDR%2Fuploads%2FBLMRb8tvHWXxkMSN8AWV%2Faffichage-conditionnel-1.png?alt=media)

{% hint style="warning" %}
**Tip**

Between the quotation marks (""), you can enter any content you like: text, special characters or Word-compatible formatting elements (line breaks, page breaks, section breaks, multi-column layouts, etc.).
{% endhint %}

* Close the condition by right-clicking and selecting "Update Field", then upload the template and test

### Display "free" if the total amount is 0, otherwise display the total amount

Assuming you already have a template, follow these steps:

* Make sure you have a main object and a child object configured, and a table in your document template
* Open the Assistant from the document template
* Find the field of your child object on which to base the condition
* Click the 3 small dots, then "Add a condition"
* Enter "0" as the expected value
* In the text if true, enter "Free", and in the text if false, paste the tag you want to display
* In the Word table, place your cursor where you want to insert the condition, insert it via "Insert/Field" or from "Quick Parts" > "Field..." and confirm

!["Free" condition in a Word table](https://4198981723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTYUzkIngX1MnHE8kOJDR%2Fuploads%2FXLQsquvC1TL53HdlV1rQ%2Faffichage-conditionnel-2.png?alt=media)

* Close the condition by right-clicking and selecting "Update Field", then upload the template and test

### Display a checked or unchecked box in Word

Assuming you already have a template, follow these steps:

* Open the Assistant from the document template
* Find the field of your child object on which to base the condition
* "Text if the box is checked" = "✅"
* "Text if the box is not checked" = "❌"
* Confirm and copy the condition
* From your document template, paste the condition via "Insert/Field" or from "Quick Parts" > "Field..." and confirm
* Close the condition by right-clicking and selecting "Update Field", then upload the template and test

You can also display images, emojis, logos or symbols of your choice.


---

# 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/getting-started/conditional-display/simple-condition-examples.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.
