web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Apply to each gone wild
Power Automate
Answered

Apply to each gone wild

(0) ShareShare
ReportReport
Posted on by 5,836 Moderator

I have a SharePoint list that with 5 lookup columns that I need to replace with single line of text columns (this is the easy part).    As part of this process I need to update each new text column with the associated value from the lookup column.   The text columns have been created and all that remains is to update them with existing selections from their associated lookup columns

 

It seems that this should be a relatively straightforward process, but it's not acting that way. 

 

I have started with a Get Items to get all the items in the list and then an Update Item which gives me the Apply to each.   I am good until I select the 2nd text column to update and it adds a new apply to each.   The 3rd adds a third apply to each, so I know I have gone off the rails somewhere but not sure where.   I have selected the Value for each lookup column to copy to the text column as you can see in the 2nd image.

 

Any help will be greatly appreciated.

 

Apply to each.pngLookupValue.png

Categories:
  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @JR-BejeweledOne Seems Your lookup column has multiple choices. is it so?

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Yes, it is multiple choices.

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @JR-BejeweledOne  Then just pass the lookup field value ID OR use https request to update lookup value.

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    I still think this isn't right.   I have 4 of these lookups where I need to set the value into associated text fields.   I am trying to do this in a single update action but as I add the value to each text field it adds an additional nested apply to each using the value from the previous apply to each.

     

    I don't think that is going to work well.

     

    ApplyToEach2.png

  • Verified answer
    JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    After a bit more research and trial and error, this is what I ended up doing.   

     

    I get the items using Get-Items.  Then for each Item I have to get the value of the multi-select column by using a Select action and 'clean it up' by joining it.

     

    In the select action switch the map mode so it's not in key value mode.   You can see in the image that it would return to key value mode if I were to select it again.    Then using the expression builder type in the expression. 

    Using the dynamic outputs add repeated Apply to each actions which mess up the flow and cause it to fail.

     

     

    item()?['value']

     

     

     

    select.png

     

    mapexpression.png

     

    Once you have done that you add a join and select the output from the Select action and give it the delimiter to use.   The output of the Join action can be used directly in the Update Item property you wish to update.

     

    joinselect.png

     

    UpdateItem.png

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard