Skip to main content
Community site session details

Community site session details

Session Id : ZYV+KIB+4/zeA4OYyPKkKA
Power Apps - Microsoft Dataverse
Unanswered

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

Like (1) ShareShare
ReportReport
Posted on 30 Mar 2023 17:34:13 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

 

 

  • gng Profile Picture
    167 on 31 Mar 2023 at 04:27:47
    Re: Power Automate Filter Query Add Table Records That Do Not Exist in Another Table

    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)?

  • 365-Assist Profile Picture
    2,314 Moderator on 31 Mar 2023 at 00:39:49
    Re: Power Automate Filter Query Add Table Records That Do Not Exist in Another Table

    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 31 Mar 2023 at 00:34:24
    Re: Power Automate Filter Query Add Table Records That Do Not Exist in Another Table

    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,314 Moderator on 30 Mar 2023 at 22:02:23
    Re: Power Automate Filter Query Add Table Records That Do Not Exist in Another Table

    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

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June 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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Featured topics

Loading started
Loading complete