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 Platform Community / Forums / Power Automate / Compare 2 columns in s...
Power Automate
Unanswered

Compare 2 columns in same list with multiple values in 1 column

(0) ShareShare
ReportReport
Posted on by 5

Hi,

 

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!

 

Flow

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 1ID set 2
31234512344
21223214567, 12456
11345612654, 12344
Categories:
I have the same question (0)
  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @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?

  • mundy727 Profile Picture
    5 on at

    Thanks Anna, 

     

    Its single line of text with values separated by comma

  • AnthonyAmador Profile Picture
    2,553 Moderator on at

    Hi @mundy727 

     

    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.

     

    AnthonyAmador_0-1622584618017.png

    AnthonyAmador_1-1622584635611.png

    AnthonyAmador_2-1622584736466.png

    AnthonyAmador_3-1622584756172.png

     

    Probably there is a better solution for this, if someone have any idea feel free to join. 

     

    Cheers. 

     

     

  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @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

    split(triggerOutputs()?['body/IDSet2'],',')

    annajhaveri_0-1622624764781.png

     

    2. Then add Apply to each action and configure to use outputs of above compose action in the apply to each action

    annajhaveri_1-1622624774490.png

     

    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

    annajhaveri_2-1622624813514.png

    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

    annajhaveri_3-1622624879916.png

     

    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

    annajhaveri_4-1622625325374.png

     

     

  • mundy727 Profile Picture
    5 on at

    Thanks Anna! I will give this a try. Appreciate your help here.

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

#2
Tomac Profile Picture

Tomac 427 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard