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 Automate
Suggested Answer

Compare two arrays

(1) ShareShare
ReportReport
Posted on by 2
Hi Team,
I have an SQL data source and a SharePoint list. The SQL list has columns PURCHID and DOCUMENTSTATE. The SharePoint List has columns PONumber and DocumentState. PURCHID and PONumber are unique keys.
I want to get the list of SQL rows (this is the up to date info), then get the list from the SharePoint . I then want to compare the value of DocumentState in the SharePoint list to the corresponding record from SQL, based on a match between the PURCHID and the PONumber in the two data sets. I would then update the SharePoint list to reflect the new values from SQL, but only for records changed. I have done this in an apply to each loop which is incredible inefficient so want to no avoid using this but I am having a lot of difficulty figuring it out.
 
SQL
PURCHID , DOCUMENTSTATE
PO12345, 10
PO23456, 20
PO34567, 30
 
SharePoint
PONumber, DocumentState
PO12345, 20
PO23456, 20
PO34567, 30
 
Resulting SharePoint update
PO12345, 10
 
Any help would be much appreciated.
Thanks in advance
Stu
Categories:
  • Suggested answer
    abc 123 Profile Picture
    789 Moderator on at
    Unfortunately, you're trying to make RDBMS moves in a Spreadsheet World. SharePoint does not have a query engine. It's a Content Management System that pretending to be bigger.
     
    Since you have SQLS, I would create a Cursor or UDF (I don't know the nomenclature anymore) there that does a proper join and update. That's the right tool for the job.

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 298 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard