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 Automate / How to check which rec...
Power Automate
Suggested Answer

How to check which records are missing in SQL

(0) ShareShare
ReportReport
Posted on by 2
Hello, 
I have such a flow and I would like to check what records are missing in SQL in relation to SharePoint. Two databases have the same ID. I am a bit confused and I am asking for help:
Categories:
I have the same question (0)
  • David_MA Profile Picture
    14,815 Super User 2026 Season 1 on at
    It has been quite a while since I have done something like that, but I think what you need is in this blog post: Efficient Union, Except And Intersect – Great Method - DamoBird365. I don't know if this is the same resource I used, so I cannot guarantee it will meet your needs. But I am pretty sure you can do it with something like this.
  • Suggested answer
    SaiRT14 Profile Picture
    1,992 Super User 2025 Season 1 on at
    • Loop through SharePoint IDs:

      • Use an Apply to Each loop on the SharePoint IDs array.
      • Inside the loop, use a Condition action to check if the current SharePoint ID exists in the SQL array.
    • Check for Missing Records:

      • If the ID does not exist in the SQL array, you can mark it as missing by appending it to a separate array (e.g., a "Missing IDs" array).
    • Create Output:

      • Once the loop completes, output the "Missing IDs" array to either a SharePoint list, SQL table, or send it via email using the Send an email action.
  • CU30091316-0 Profile Picture
    2 on at
    I tried to use Filter Array but I get the wrong result. This is my code.
     
    What I mean is that when I have 25 in SQL I would like to find those 4 more that are in Sharepoint 
     
    @not(contains(outputs('Get_rows_(V2)')?['body/value'], item()))

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 411

#2
David_MA Profile Picture

David_MA 300 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 291

Last 30 days Overall leaderboard