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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to evaluate if a f...
Power Automate
Unanswered

How to evaluate if a field / variable is NULL and if so don't use in a "Apply to each" loop?

(0) ShareShare
ReportReport
Posted on by 94

Good day everyone.  I've got a Flow that I'm using to consume vendor invoices from PDF into Dynamics.  To send the data to Dynamics 365 for Finance and Operations, I am using the connector which has fields, like "Quantity" and "Unit Price".  My issue is this -- if I put my variable for the quantity field but the variable is NULL, that action fails.   This is creating lines in Dynamics so it is in an "Apply to each" loop.  On some invoices, it is picking up garbage lines in between the real lines which don't have the necessary info so it is trying to insert NULL (I am guessing) for those lines.  The real lines are getting processed successfully.

 

I'm trying to figure out how to skip those garbage lines from being processed?  I'm wondering if there is a formula / expression I can use in the "Apply to each" input that will skip a line if it does not contain a quantity and / or a unit price?


Thank you!  I've been staring at this for days and getting crosseyed.  I imagine there is an easy answer right in front of me but been looking at this too long 🙂

 

Ford

Categories:
I have the same question (0)
  • Kaif_Siddique Profile Picture
    2,108 Super User 2024 Season 1 on at

    Hi @ford_wilkinson ,

     

    Add a condition to check the null Quantity. 

     

    Flow:

    Kaif_Siddique_0-1663961629937.png

     

    If you like my response, please give it a Thumbs Up.
    If this helps, please Accept as solution.

     

    Regards
    Kaif

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

Forum hierarchy changes are complete!

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

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 245 Super User 2025 Season 2

#2
Expiscornovus Profile Picture

Expiscornovus 207 Most Valuable Professional

#3
trice602 Profile Picture

trice602 190 Super User 2025 Season 2

Last 30 days Overall leaderboard