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. 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 tutorial.

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.

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.

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.

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.

For Texts the available options are:

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 are:

True, False

For Date & Time the available options are:

Is after, Is before, Is between

For Images the available options are:

Is equal to, Is not equal to

For Files the available options are:

Is equal to, Is not equal to

For Addresses the available options are:

Is within, Is not within- Miles of, Kilometers of

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.

Last updated