cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ChiPower20
Regular Visitor

Power Automate "Vlookup" for 2 SharePoint lists

I am not an expert at Power Automate but understand some high light items.   Currently I have 2 lists   say A & B list.  List "B" has data that needs to be added to list A.  I wanted to schedule any new entry to list A it will look the data from list "B" via an ID and then add that data back to list A.  

 

Seems like I am missing something.

11 REPLIES 11
JohnAageAnderse
Memorable Member
Memorable Member

Hello @ChiPower20 

This sounds like you should just link the two lists together with a lookup column in list "A" that shows items from list "B". With a lookup column you can indicate that additional columns from list "B" also should be shown.

Have you tried that and would it satisfy your need?

Kind regards, John

I did look at the lookup feature built into SharePoint but i dont see how would find the correct record and add new data 

danishpowerapps
Frequent Visitor

I have a similar request - the issue is the lookup should be done automatically (like in Excel).

With an ordinary Sharepoint lookup column you have to select the lookup key MANUALLY for each row (whereafter the lookup value is returned).

Hello @danishpowerapps 

Please clarify - do your lists both have a column with values that can be used to link the lists together?

 

Example:

List A, column CodeA, value "ABC123"

List B, column CodeB, value "ABC123", other columns

 

When a new item is created in List A

Get items from List B with CodeB = CodeA

Update item in List A with values from items retrieved from List B (zero, one or more items!!)

 

Is the above the scenario you are looking at?

Kind regards, John

danishpowerapps
Frequent Visitor

Hello @JohnAageAnderse  

 

Thanks for your reply to the request.

Please clarify - do your lists both have a column with values that can be used to link the lists together?

Yes - both list have a key column

 

I am aiming to conduct a lookup between the lookup column found in each table (List A, List B) and return a string value found in one of the other columns in List B (lookup table) to List A.

Example:
List A, column CodeA, value "ABC123"
List A, column CodeB, "not yet started" (lookup value from: List B, column CodeB)

List B, column CodeA, value "ABC123"
List B, column CodeB, value "not yet started"

Hope I have managed to draw the picture clearly enough 🙂

Kind regards, Johan

Hello @danishpowerapps 

Based on the information provided, then the only thing you need to do in your Get items action (from List B) is to specify the Filter Query field like:

KeyB eq 'KeyA value'

where KeyB is your column internal name!

Filter Query example.jpg

After that, take the value from the column you need from the item(s) retrieved by the Get items action.

Kind regards, John

danishpowerapps
Frequent Visitor

Hi @JohnAageAnderse 

 

Very enlightning - I have now implemented it and it works!

 

Thank you very much for your help. One step further away from using spreadsheets 🙂

 

Kind regards,

Johan

is it possible to make this work via a manual workflow trigger and not based on when a new item is created. 

Hello @Earl20 

Yes it is. You can manually provide the ID of the item from list A that you want to use for a lookup in list B.

Or you can use a loop to process all items in list A and for each do a lookup in list B.

It all depends on your need.

Kind regards, John

to set it up would i need 2 get items actions one to pull stuff from list A and one to Pull list B?

Hello @Earl20 

It all depends on your requirements! Are you going to process one item from list A or all of them?

 

Scenario "One known item from list A"

Trigger is manual and the ID is entered upon triggering.

Get item from list A using ID from trigger

Get items from list B using FilterQuery <KeyB> eq '<KeyA>'

Do whatever is needed

...

 

Scenario "All items from list A"

Trigger is manual

Get items from list A

Apply to each item from list A

- Get items from list B using FilterQuery <KeyB> eq '<KeyA>'

- Do whatever is needed

- ...

 

Kind regards, John

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,865)