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 / Extracting values from...
Power Automate
Unanswered

Extracting values from a Multiline Text column, comparing each extracted value to update another sharepoint list

(0) ShareShare
ReportReport
Posted on by 41

I have a list having a multiline text column. I want to extract values and use each value to update the matching value in another list. Need help on how to get this done. Original list column has multiple site IDs. I want to separate each site ID, find the matching ID in other list, and then update Invoicing status column in the  2nd list. Need help with this pls.

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @imranzafar 

     

    You mentioned "Original list column has multiple site IDs." Is this the multiline text column? Could you please post a sample data?

     

    Thanks

  • imranzafar Profile Picture
    41 on at

    Hi @abm,

     

    Hope you are doing good.

    Attached are the two list:

    1.  Sample List >>> Column [Site IDs] has site IDs separated by commas.
      • I want to run a Flow that extracts these different Site IDs.
    2. Invoice List >>> From extracted Site IDs from Sample list column, I want the Flow to match site IDs from this (Invoice List) column [Title] and then update [Invoice Status] column with comments "Received".

    Would appreciate if you can help with this.

     

    Thanks,

    Imran

  • v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @imranzafar ,

     

    Do you want to change the Invoice Status of the Invoice List to "Received" when the value in the Title column of your Invoice List exists in the Site IDs column of the Sample List?
    I have a test for your reference. In my scenario, if the Title of List5 exists in the Site IDs column of List4, change the Invoice Status of List5 to "A".

    vdezhilimsft_0-1673852281174.png

    vdezhilimsft_2-1673852306253.png

    vdezhilimsft_3-1673852341290.png

    vdezhilimsft_4-1673852379399.png

    vdezhilimsft_5-1673852422892.png

    vdezhilimsft_6-1673852469756.png

    Best Regards,

    Dezhi

     

     

     

  • grantjenkins Profile Picture
    11,063 Moderator on at

    @imranzafar Are you looking to do this when a new invoice is created in the Sample List (When a new item is created), or do you just want to manually run the flow and iterate through all the invoices in the Sample List?

  • imranzafar Profile Picture
    41 on at

    @grantjenkins I want to do it "When a new item is created".

  • grantjenkins Profile Picture
    11,063 Moderator on at

    This is likely how I would build the flow.

     

    See full flow below. I'll go into each of the actions.

    grantjenkins_0-1673854803482.png

     

    When an item is created will trigger the flow.

    grantjenkins_1-1673854841704.png

     

    Apply to each uses the following expression to iterate through each of the Site IDs.

    //Note that the internal name of my Site IDs column is SiteIDs
    split(triggerOutputs()?['body/SiteIDs'], ',')

    grantjenkins_2-1673854920354.png

     

    Get items uses the following expression in the Filter Query. This will retrieve the item with the current Site ID.

    Title eq '@{items('Apply_to_each')}'

    grantjenkins_3-1673854970409.png

     

    Apply to each Update will iterate over each of the items returned (should only be one item) and update it with the Status Received.

    grantjenkins_5-1673855068021.png


    ----------------------------------------------------------------------
    If I've answered your question, please mark the post as Solved.
    If you like my response, please consider giving it a Thumbs Up.

  • imranzafar Profile Picture
    41 on at

    Not working for me. The condition is returning False as a result "If yes" scenario is not coming in place.

  • imranzafar Profile Picture
    41 on at

    @grantjenkins Thanks a lot. Your suggested solution is working fine.

    Can you please help further if I want to make this flow work as "When an item is created or modified"?

    In this scenario, when the item is created, the above solution is OK.

    For modified case, I will add an [Invoice Status] column in "Sample Invoice List" and as soon status becomes "Approved" flow is triggered to update "Sample Invoice Received" column to "Approved" against respective sites.

  • grantjenkins Profile Picture
    11,063 Moderator on at

    See update below.

     

    I've added a Choice column in my Sample Invoice List called Status with two choices: Pending and Approved. The default value is set to Pending.

    grantjenkins_0-1673876938207.png

     

    All you would need to do is delete the current When an item is created trigger and replace it with a When an item is created or modified trigger.

    grantjenkins_1-1673877837066.png

     

    Then in the Update item, use the following expression to set the Status (Received or Approved) depending on the Sample Invoice List Status (Pending or Approved).

     

    if(equals(triggerOutputs()?['body/Status/Value'], 'Approved'), 'Approved', 'Received')

     

    grantjenkins_0-1673877957196.png

     

  • imranzafar Profile Picture
    41 on at

    @grantjenkins Thank you for the solution.

    One problem that could be faced is there might be cases where a site ID is part of more than one invoice. How can this scenario be solved for both Received and Approved cases and adding Invoice number in Sample Invoice Received List against each site ID dynamically through trigger?

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard