I am attempting to build a flow to notify me when a new Sharepoint list item is created, it will detect that a value matches another item such as example below (Item #3 contains the same value in ID set 2 as item #1 - 12344). In this SP list, there are multiple values separated by commas. Example shown in the table below.
My flow so far is as follows, I'm just hung up on the formula to use to capture this or if this is possible? My first time posting here appreciate any assistance And guidance!
1.) When an item is created --> site address an SP list name used
2.) Get items --> from SP list from #1
3.) apply to each --> value
4.) condition --> if ID Set 2 contains EXPRESSION HERE
5.) Send email
|Item #||ID set 1||ID set 2|
@mundy727 could you please let me know what is the data type of ID set 2 column in the list? Is it single line of text with values separated by comma or multiple choice field?
I think one way to achieve this is converting the single line of text to a string and separate the numbers into an array then make another array with the ID Set 2 of each item and compare the two arrays.
Probably there is a better solution for this, if someone have any idea feel free to join.
@mundy727 so you want to get value of IDSet2 from current item (which is newly created) and compare IDSet2 values with other items in the list, if yes, then do following:
1. Add Compose action and configure below expression in compose action
2. Then add Apply to each action and configure to use outputs of above compose action in the apply to each action
3. Then add Get Items action inside the apply to each action and configure it as shown below, select SharePoint site, List and provide the filter queyr as shown in below screenshot
4. Now again add Apply to each action to loop through items fetched by Get Items, use value(list if items) from Get Item dynamic content here
5. Now if you want to send email for each match individually then add Send email action under the second apply to each action. But if you want to send one email which has details of all of the matching items found in the list, then you have to store all matching item details in variable and add send email action at the end of the flow.
Full flow screenshot below and guidelines of sending email added as comments in below screenshot
Check out the new Process Advisor community forum board!
Check out new user group experience and if you are a leader please create your group
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.