# Conditional Actions

With Adalo, you can add logic to your actions so that they only happen when certain rules apply. This works very similarly to [setting up a components visibility](/component-basics/changing-a-components-visibility.md). \
\
One example of this is linking to different pages depending on if the delivery zip code that a customer entered is a zip code available for delivery.\
\
Another example is if you were to set up a toggle to allow users to follow and unfollow other users. This example can be found in the [How To Allow Users to Follow Others](/how-to/how-to-allow-users-to-follow-others.md) tutorial.&#x20;

### Set up the action to only occur sometimes

To set up the conditions for an action, you will first need to set up the action. For more details on setting up different kinds of actions, you can refer to the help manual for the specific kind of action.

1. Select your component.
2. Set up your action.
3. Select the action.
4. Select *Show Advanced.*
5. Under *When does this happen?* Select the drop down arrow where it says *Always* and change it to *Sometimes.*

![](/files/-M4yehVY2AKszynZzSo2)

### Set up the conditions

There are three parts to setting up a condition: the property that the condition will apply to, the comparison type and the comparison value.

{% hint style="info" %}
When using a Link Action with multiple conditional Actions, one of those links must be a non-conditional action to act as a 'fallback' option.
{% endhint %}

#### Select the property

When selecting what the condition will apply to, you can choose between any current data, form inputs on the current screen, the Date / Time, all of a collection or the count of a collection.

#### Select the comparison type

The comparison type is set up as a drop-down. Depending on what property you have selected, the comparison type options may vary.&#x20;

{% hint style="info" %}
For **Texts** the available options are:&#x20;

*Is equal to, Is not equal to, Contains*

For **Numbers** the available options are:

*Is equal to, Is not equal to, Is greater than, Is less than, Is greater than or equal, Is less than or equal and Is between*

*For* **Toggles** the available options ar&#x65;*:*

*True, False*

For **Date & Time** the available options are:&#x20;

*Is after, Is before, Is between*

For **Images** the available options are:&#x20;

*Is equal to, Is not equal to*

For **Files** the available options are:&#x20;

*Is equal to, Is not equal to*

For **Addresses** the available options are:&#x20;

*Is within, Is not within- Miles of, Kilometers of*&#x20;

{% endhint %}

#### Set the comparison value

The comparison value is the value that you want the property to contain, not contain, be equal to or not be equal to depending on the comparison that you selected.

1. Underneath where it says *This Action will only happen if...* select the drop-down arrow next to where it says *Select.*
2. Select the property.
3. Select the comparison value
4. Set the comparison value
5. Select *Done.*

![](/files/-M4yfo6PQjbZsGYqKquw)


---

# 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://help.adalo.com/actions/conditional-actions.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.
