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
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.
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.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.
If you are a small business ISV/Reseller, share your thoughts with our research team.