web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

To check null or empty when item created or modified .error in trigger condition

(1) ShareShare
ReportReport
Posted on by 2,247
Below trigger conditions were causing the flow to over run and let me know how to optimize or if the below trigger condition is fine
 
@and(equals(empty(triggerOutputs()?['body/ClientName']), false),equals(empty(triggerOutputs()?['body/Country']), false))
 
@and(not(equals(triggerOutputs()?['body/Country'], null)),not(equals(triggerOutputs()?['body/ClientName'], null)))
 
 
I have the same question (0)
  • Verified answer
    creativeopinion Profile Picture
    10,482 Super User 2025 Season 2 on at
    To check null or empty when item created or modified .error in trigger condition
    Both of your expressions in the trigger conditions are checking for similar but slightly different things.

    Your first trigger condition:

    @and(equals(empty(triggerOutputs()?['body/ClientName']), false),equals(empty(triggerOutputs()?['body/Country']), false))

    This condition checks if both ClientName and Country are not empty. The expression checks to see if both fields have some value and are not empty strings.

    Your second trigger condition:

    @and(not(equals(triggerOutputs()?['body/Country'], null)),not(equals(triggerOutputs()?['body/ClientName'], null)))
    
    This condition checks if both ClientName and Country are not null. The expression checks that both fields are not equal to null. 
     
     
    The first condition ensures the fields are not empty, while the second ensures they are not null. Since all trigger conditions must be true for the flow to run, having both can create unnecessary redundancy.
     
    You only need one expression to ensure that the fields are neither empty nor null. Here is a simplified version that combines both checks:
     
    @and(
    not(empty(triggerOutputs()?['body/ClientName'])),
    not(empty(triggerOutputs()?['body/Country']))
    )
     
    • not(empty()) Check: This single check will ensure that the fields are neither empty strings nor null.
    • not(empty(triggerOutputs()?['body/ClientName'])) ensures ClientName is not empty and not null.
    • not(empty(triggerOutputs()?['body/Country'])) ensures Country is not empty and not null.
    • By using this condition with the and operator, you are ensuring that both ClientName and Country are not empty and not null for the flow to trigger. This means that the flow will only run if both conditions are met.
     
    Can you try out the expression above and see if it meets your requirements? 
     
    ---
     
    Check out this YT Tutorial for more details on how to add Trigger Conditions to your flow: 4 Ways You Can Use Trigger Conditions in Your Microsoft Power Automate Flow

    If you are using an Automated Cloud flow trigger in your flow—you need to consider adding trigger conditions.
    Do YOU 🫵 know what a trigger condition is? Trigger conditions can be set in most flow triggers. These conditions you set must be true for the trigger to fire. In this Power Automate tutorial, I’m going to show you how to use trigger conditions in your flows to control when your Power Automate flows trigger.
    If your plan has flow run limits—you can avoid triggering your flows unnecessarily by using trigger conditions.
    I’ll cover four different flow examples that would benefit from trigger conditions:

    ⚡️ Triggering a flow when a column is changed to a specific value
    ⚡️ Triggering a Flow When an Event Updated or Deleted
    ⚡️ Triggering a Flow When a New Folder is Created
    ⚡️ Triggering a Flow When a Specific Email is Received I’ll also show you a trick on how to easily create the expressions needed and give you a few tips on how to troubleshoot your flow.

    IN THIS VIDEO:
    ✅ Four different flows that would benefit from trigger conditions
    ✅ What is a trigger condition?
    ✅ How to add a trigger condition to your flow
    ✅ How to trigger a flow when a column is changed to a specific value
    ✅ How to trigger a flow when an event is updated or Deleted
    ✅ How to trigger a flow when a new folder is created
    ✅ How to trigger a flow when a specific email is received
    ✅ How to troubleshoot a trigger condition
    ✅ How to prevent case sensitivity issues with a trigger condition
    ✅ How to use the filter array action to easily compose an expression that can be used in a trigger condition
     
     
    Hope this helps!

    Consider giving me a ❤️ if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 535 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 348 Moderator

#3
developerAJ Profile Picture

developerAJ 262

Last 30 days Overall leaderboard

Featured topics

Restore a deleted flow