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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Automate Filter ...
Power Apps
Unanswered

Power Automate Filter Query Add Table Records That Do Not Exist in Another Table

(1) ShareShare
ReportReport
Posted on by 167

Hi,

 

My Power Automate flow returns a filtered list of all the records in Table A and for each record, create a new record in the Contacts table. I am currently passing in a Power Automate variable from a previous step and that filtering works perfectly. I am having trouble with writing the OData or FetchXML query to check whether the email address of the current record being iterated on in Table A exists in a Contacts record.

 

I'm trying to decide whether I should be using OData or FetchXML Query (or can I combine both?). I have some worry with using FetchXML filter query because I need to pass in variables that were initialized in Power Automate.

 

gospa_1-1680197451450.png

 

 

I have the same question (0)
  • 365-Assist Profile Picture
    2,324 Moderator on at

    I would add a few actions in Apply to each before you add the record. 

    - List records in Contacts with a filter whether email address eq email address from Table A.

    - Then add another Apply to each on the List Contact table. 

    - In that Apply to each add the Create new record.

    ---------------------------------------------------
    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    Subscribe: https://www.youtube.com/channel/UCFpvUlpx84FuIPOdInGKMTw
    Twitter: https://twitter.com/assist_365

    Regards
    Darren Lutchner - 365 Assist

  • gng Profile Picture
    167 on at

    This would add a new Contact record where an email address matches the email in Table A. My requirement is to only create a Contact record if no such record where the email address matches.

     

    This pattern also introduces a while loop within a while loop and may be a performance hit. I was hoping to accomplish this in a single OData filter query or a FetchXML filter query but the latter seems not possible because I require the query to be filtered using a Power Automated-created variable.

  • 365-Assist Profile Picture
    2,324 Moderator on at

    In the List Records you could use ne (instead of eq). I appreciate that it would impact.

     

    The other option is you could try doing this in a Dataflow instead of using Power Automate. 

    ---------------------------------------------------
    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    Subscribe: https://www.youtube.com/channel/UCFpvUlpx84FuIPOdInGKMTw
    Twitter: https://twitter.com/assist_365

    Regards
    Darren Lutchner - 365 Assist

  • gng Profile Picture
    167 on at

    It sounds like the OData filter query in Power Automate does not have the ability to join on other existing tables on the dataverse (such as the Contacts table)?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 617

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard