Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
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

 

 

  • gng Profile Picture
    167 on at
    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,312 Super User 2025 Season 1 on at
    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 at
    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,312 Super User 2025 Season 1 on at
    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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 17

#2
mmbr1606 Profile Picture

mmbr1606 15 Super User 2025 Season 1

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics