Skip to main content
Community site session details

Community site session details

Session Id : 5JCAKzP5+4lulEq2mAfk+m
Power Automate - Building Flows
Unanswered

Sharepoint List - Auto populate Lookup column (VLOOKUP between 2 SP Lists) based on another column (using Power Automate)

Like (0) ShareShare
ReportReport
Posted on 11 Nov 2021 19:50:37 by 28

Hi All,

I am trying to auto populate a lookup column in a sharepoint list from another sharepoint list based on a column.

Basically a VLOOKUP.

I am not that good with PowerAutomate and have been banking my head trying to solve this problem.

I am hoping you guys will be able to help.

Requirement:

When an item is created or modified, trigger flow.

For all items created or modified, Perform a lookup for' Brand Name' in 'LostPackagesDB' list and return the 'Retailer' field matching the 'Sender' field in the 'LP_SenderLookup' list.

 

Below is what I have done till now. But something is wrong in this flow/logic.

AchalDesai_1-1636656825866.png

Procedure:

Use Trigger when Item is created or modified.

Then get items from the master list 'LostPackagesDB'.

Then use a For Each loop and get items from the lookup list 'LP_SenderLookup' with filter query to get only the matching record.

Then store the matched Retailer value in the compose activity.

Then check if the compose activity is not empty and the 'Retailer' column in the master list is empty.

Then update the current item's 'Retailer Field with the value stored in 'Compose' activity.

AchalDesai_3-1636657135706.png

Error:

1. The Apply to Each parameter for 'Apply to Each' activity is incorrect as it is running for all the items in the list rather than just the ones created or modified and applying the matched value to all records of the master list. Is there a way we can limit the apply to each activity to only the items created/modified?

2. The flow is running in an infinite loop because I am guessing the it is iterating through all the items on the master list and each item is being modified.

3. I have a value in 'Brand Name' column of the master list that has an " ' " in it's name (e.g. Victoria's Secret). This is causing the query to fail. The flow says Unable to Build query only for this value. For other values, it works, but goes into an infinity loop as mentioned above.

 

I would be grateful if you guys could help me out on this.

 

 

 

 

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Loading complete