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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to check which rec...
Power Automate
Unanswered

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
    12,966 Super User 2025 Season 2 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,990 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard