• Documentation
  • Workato Blog
  • Product Blog
  • Return to Workato
  • Log in
  • ☰
  • Solutions
  • Forums
  • Tickets
Solution home Recipe 101 Formula Mode Tips and Tricks

How Do I Mix Conditional 'If's (AND and OR)?

Created by: Kyle Tan

Modified on: Thu, Jul 20, 2017 at 9:13 AM

Workato recipes regularly contain compound conditional actions of the same type ('If X and Y and Z' or 'If X or Y or Z').

But how do we mix different conditional actions ('If X and [Y or Z]')?

While conditional actions must be of the same type, we can effectively mix conditions by using formula mode.

For example, what if we want a recipe to only trigger when:

  • "Start Time" is present
  • and either "User ID" or "Recipe ID" are present
To explain how this is possible, we will start by simplifying the problem. We will begin with just one AND condition:

In order to add an OR condition, we will click the blue formula mode toggle button at the right side of the second "Trigger data" field:

We will use the ".present?" method with OR, and change the condition to "is true". Our trigger conditions are changed to now look like this:

Now, when the recipe is run, it will only be triggered when:
  • Start time is present
  • AND (User ID or Recipe ID are present)


K
Kyle is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

Related Articles

    Still can't find your solution?

    Visit our forums to search for answers, or post your own questions.

    Documentation
    Developer's Library
    Tutorials
    eBooks
    Expert Hour
    Product Hour
    Product Blog
    Workato Blog
    Product updates
    Customer Stories
    Workato 2018 © | Privacy | Terms | +1 (844) GO-WORKATO
    • Documentation
    • Workato Blog
    • Product Blog
    • Solutions
    • Forums
    • Tickets
    • Log in
    • Return to Workato