Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

If one or more Invoice Product contains CustomField = XXX, then do...

(1) ShareShare
ReportReport
Posted on by 2

I have a CustomField that was created on Invoice Products.  If an Invoice is created, multiple products can be added to the invoice.  I need to check if any Invoice Products contain CustomField equal to XXX.  

 

If Invoice contains any Invoice Product with CustomField = XXX, create one row on CustomTable. 

 

The only way I can find to do this creates the "For Each" situation.  I don't want multiple rows created in CustomTable.  It's an "If one or more items contains CustomField = XXX, then do..." kind of a situation.  It doesn't matter if 6 items contain CustomField = XXX, I only want one row in CustomTable. 

 

The plan is to have this run once per day, at night and have it check for anything that was created the previous day.  

 

Invoice AA created.  It contains 3 products with CustomField = XXX.  One row is created on CustomTable.

 

Invoice BB created.  It contains 0 products with CustomField = XXX.  No row created on CustomTable.

 

Invoice CC created, it contains 1 product with CustomField = XXX.  One row is created on CustomTable.

 

Even though 3 invoices were created with a total of 4 products that contained the target value, only 2 rows were created on the table to represent it. 

 

I can't find any information on how to do this.  Everything I have tried results in the "For each..." scenario and I would en up with 4 rows created on the table. 

 

Any help or guidance towards instructions is appreciated. 

 

 

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492