cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
shibathedog
Helper I
Helper I

Check if record exists in Sharepoint and if not - create item

Hi all, I am very new to Power Automate so I would ask for some help. I managed to do the following:
I get data from SAP, parse JSON from it, filter the array from parsed json, set variable for every entry and make a new array out of it (append to array variable).
I get data from Sharepoint, compose the column I need, set variable from items in it, and append it to array variable.

 

In the last step I want to make a condition to check if the elements from SAP new array exist in the Sharepoint array, and if not, I would like to add them to the Sharepoint table (create item).


I tried numerous things but I either end up with 1 new entry, with duplicated entries, with multiplied entries (for array x array items) or with a blank entry. Can somebody please advise? Thank you very much for the help!!

shibathedog_0-1630511968589.png

 

 

shibathedog_1-1630512002153.png

 

shibathedog_2-1630512025200.png

 

In the screenshoted example I have: 2 entries in the Sharepoint, 7 entries in the SAP array (of which 5 should be written to sharepoint) but I end up with 7 times one of the entries (so the same entry entered 7 times and nothing except it).

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
shibathedog
Helper I
Helper I

Solved it! I should've passed item() to reference items in the list, and not the name of the variable which went into the array. The same for writing to sharepoint.

View solution in original post

1 REPLY 1
shibathedog
Helper I
Helper I

Solved it! I should've passed item() to reference items in the list, and not the name of the variable which went into the array. The same for writing to sharepoint.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,799)