How to Apply Multiple Conditionals in PAD

When I learn new things, I try to write them down. If I don’t, the odds are good I will have to look it up again and might not be able to find the answer easily. In other words, I’m wasting my own time. So, the fifth time I Googled how to apply multiple pieces of conditional logic in Power Automate Desktop, I made myself write it down. Read on to learn more.

Simple Conditional Logic in PAD

Simple conditionals, or IF statements, are easy to add to PAD flows. Users populate two operands and an operator. But, what if you want to add boolean operators like AND or OR to layer in more logic?

The “%” denotes a variable in PAD.

I’ve seen more than one Community post suggest using nested IF statements to solve this problem. Sure, that’s reasonable if you have two conditionals, but what if you have five or ten or any form of complex logic. No thanks.

Go Away GIF by Bounce
Go Away GIF by Bounce

So, let me show you how to modify the IF statement shown above to include additional logic with AND or OR.

Use Case & Solution

My use case looks at the values in two variables called ItemLandDocType and ItemRecorded. ItemRecorded will be either “Recorded” or “Not Recorded”. I want to take a specific action if ItemLandDocType = ‘SSE’ AND ItemRecorded = ‘Recorded’.

To apply this logic, I use the same IF action. Then, modify the first operand to hold the logic. Notice all of the logic lies within the “%”. And, the string values I am searching for sit between single quotes. Lastly, set the second operand to boolean TRUE or FALSE. It works the same with an OR operator.

%ItemLandDocType = 'SSE' AND ItemRecorded = 'Recorded'%

If you need more logic, apply it within the “%”. And, now you know how to apply multiple conditionals to a Power Automate Desktop action.

Other Sweet Microsoft Content

I’m currently in the middle of a beginner series on learning to use Power Automate.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.