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 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:
I have the same question (0)
  • Suggested answer
    abc 123 Profile Picture
    784 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

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 507 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 267 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard