cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ian3
Resolver I
Resolver I

Comparing columns on two share point list to get differences

Thanks my problem is list A has pid 1234567 and list b has pid 1234568 my if condition is list a pid equals list b pid and it does check but list a pid line 1 against every line in list b. So if list a has 10 pids and list b has 24 i get 10 emails saying no match for each line even when it does match. Will the above work to limit the number of results. I have tried to do it on list b odata query but I get error message where it does not recognise the first part - listA dynamic content pid eq dynamic content from list 2? Any help@much appreciated. Thank you in advance

3 REPLIES 3
tom_riha
Super User
Super User

Hello @Ian3 ,

Filter Query always needs a column on the left side, then the operator, and the value. In your case you want to check if:

pid eq 'pid from list B dynamic content'

then you can check if the result of the 'Get items' is empty (no item with the id) or if there're any results which you can compare.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Hi tom_riha, so I get items for list one and another get items for list two. Using odata filter query list one Id eq dynamic content Id list two. Is this using dynamic content for both sides of eq or first part expression eq dynamic content. Then I can do if statement for pid in list 1 eq pid in 2 and only get the ones missing in list 2 into a list in html in email is this correct I won’t get for 10 items 40 plus items as in a loop. Is it possible for a screen shot. Thank you in advance. 

Hello @Ian3 ,

one 'Get items' to get all the items from list A, another 'Get items' to search for items in list B where the column (type in column internal name) eq dynamic content from list A, like this: https://tomriha.com/how-to-check-if-sharepoint-item-already-exists-in-power-automate/

Initialize an array variable, if the item doesn't exist 'Append to array variable' the item. At the end of the loop you'll have all the missing items in the variable.

 

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (932)