# Conditional Logic Function

## Steps to manage:

{% stepper %}
{% step %}
**From Option set, select the option you want to apply conditional logic**&#x20;

<figure><img src="/files/SaCCBgbepQzLFuztCDJ6" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Turn On Conditional Logic**\
On the left side, in the **Option Configuration** panel, find and check the box called **"Conditional Logic Options."**

<figure><img src="/files/T24kUG4CaA4G9ci9Jsk8" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Choose What to Match**

Select whether you want to base your conditions on the **previous option** or **Shopify variants.**

<figure><img src="/files/mFfBAYyKHJBpjyySzloT" alt=""><figcaption></figcaption></figure>

**For Shopify variants, it is a must to write down exactly the Variant name on products**&#x20;

<figure><img src="/files/DUJTFXZIppoP88aNuu8M" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Set Your Display Rules**\
Decide when the field should appear or disappear based on the conditions you create:

* **Show:** The field will only show up if *all* conditions are true. If not, it will stay hidden.
* **Hide:** The field will hide if *all* conditions are true. Otherwise, it will show.

<figure><img src="/files/RCvDrbIzAcjRsqNPEDI6" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Decide How Conditions Work Together**

* **All Conditions (AND):** The field reacts only if *every* condition is true.
* **Any Condition (OR):** The field reacts if *at least one* condition is true.

<figure><img src="/files/DS5U5I0UITwoh2OebsBn" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Set Conditions Between Elements**

Here are the condition types you can use to link elements:

* **Is equal to:** Show the field when the previous option exactly matches your selected value.
* **Is not equal to:** Show the field when the previous option does *not* match your selected value.
* **Is greater than:** (For number fields) Show the field when the previous option is greater than a certain number you set.
* **Is less than:** (For number fields) Show the field when the previous option is less than a certain number you set.
* **Starts with:** Show the field when the previous option starts with the value you specify.
* **Ends with:** Show the field when the previous option ends with the value you specify.
* **Contains:** Show the field when the previous option contains the value you specify.
* **Does not contain:** Show the field when the previous option *does not* contain the value you specify.

<figure><img src="/files/kXXJembcer2hDrVuYhG4" alt=""><figcaption></figcaption></figure>

* **For Text option type (Text/Textarea)**, it allows set up the condition of characters number: To show an element if the text field is filled out the the number of characters you set up:&#x20;

<figure><img src="/files/fsXRMmsVKVF5DM4kH7NI" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/TCAlo29DFTTb4NxzDS10" alt=""><figcaption></figcaption></figure>

* **For** **Selection option type** **(Dropdown/Checkbox/Button/Swatch),** it allows set up the condition of selection number. To show an element if the previous option is selected with the number you set up

<figure><img src="/files/IsEmGB8p7YWm5UaU0zU6" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/CNCx9ClRJRbOM8G1QAC4" alt=""><figcaption></figcaption></figure>

* **For Upload file element,** it allows set up to show an element depending on the number of file you set:&#x20;

<figure><img src="/files/ONwm4KyoFCAopPxVI8FS" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

📧 **Need Help?**\
If you run into any issues while setting up your option set, feel free to reach out to us at **Chat** or email **<contact@globosoftware.net>**.

We’re always here and happy to help — with sincerity and care!


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.globo.io/options/conditional-logic-function.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
