cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Benjimang
Level: Powered On

Add a column value from a selected item to all items in a lookup column

Hello,

 

I am trying to create a Flow that updates values between 2 Sharepoint Lists. 

 

- List 'A' contains a list of venues and their attributes. 

- List 'B' is an Agreement Register listing out agreements for groups of venues. It has an Agreement ID column (with unique values) and a lookup column to select from the venues listed above (multiple values) to include in each agreement / item.

 

Can I set up a flow that takes an Agreement ID from the Agreement register and adds it to each of the venues listed in the Lookup column?

 

I have been going aroun din circles for hours, getting stuck with nested "Apply to Each" steps popping up everywhere.

 

Thanks so much!

 

3 REPLIES 3
Highlighted
Dual Super User
Dual Super User

Re: Add a column value from a selected item to all items in a lookup column

Hi @Benjimang 

 

Please see the screenshot below:

Spo1.PNGSp2.PNG

Here, I have two lists, one Persons and one Course. The Persons list has a column 'eerf' that is a lookup to the Courses Column (on the title column) and this allows selection of multiple items from the Columns list. So I used the Get Items action to get all the columns and appended the values to an array. I then used another get items action to get all the items of the Person List and iterated to each of them, added the update item action and passed on the array created (all the items from the Course List) to 'eerf' column of the Person List. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Benjimang
Level: Powered On

Re: Add a column value from a selected item to all items in a lookup column

Hi @yashag2255 thanks for you swift reply. I'll have a crack at updating my flow today and get back to you!

Benjimang
Level: Powered On

Re: Add a column value from a selected item to all items in a lookup column

Hi @yashag2255 ,

 

Thanks again for the help. Your solution is nice, and I have used it as a base to generate greements from, but what I was asking is actually the opposite. In your example, can you:

 

1) Get Info of all courses listed in the selected Person item

2) Get Info of the the selected  Person item to obtain the details you want (ID, Title)

3) Add the person details to only the Courses listed in the Person item in step 1)

 

This means sharing info between a 'Courses' lookup column in the Person List, and putting it into ID and Title columns of the Courses List. As an additional challenge, if the Title column was itself a lookup column, can Flow still populate it?

 

Thanks so much!

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,888)