cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Leo_NYC
Helper I
Helper I

GetItem or GetItems not retrieving value in lookup column

Hi there,

 

I'm writing a flow to take a subset of items from a source sharepoint list and copy it to a sharepoint list in another group.

 

The source list resides on a subsite of the first group.  There is a lookup column called "BuildingAsset" that looks up values in a list of the parent site.  This image below shows a couple of list items from the source list.

 

Leo_NYC_0-1616988817394.png

I wrote a flow and the GetItems or the GetItem actions will pull up the items in the source list, but it leaves out the BuildingAsset lookup column values.  I tried hardcoding the Items() function but keep getting a null or an empty string because the [body/values] has all of the other columns except this one.  Is there a reason why this column or values is being left out of the getItem or getItems actions?  

 

Leo_NYC_4-1616989417579.png

 

 

Leo_NYC_1-1616989003707.png

 

 

Leo_NYC_2-1616989078147.png

Leo_NYC_3-1616989177816.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

I figured it out!!

 

If you have a list, where one of the columns is a "lookup" column.  You need to run two (2) "Get Item" actions to get the item from the main table and the corresponding item from the lookup table.  One for the main item, which will offer the "ID" of the main list.  Then you need to call a second Get Item action using the "ID: as the input.

 

Leo_NYC_0-1617929546384.png

 

View solution in original post

2 REPLIES 2
v-duann-msft
Community Support
Community Support

Hi @Leo_NYC 

 

Thank you for posting.

 

According to your description, you would like to update new item to another list but have problem with copying value from lookup column. If any misunderstanding, please kindly let me know.

 

I simply the flow by reducing step 3-4 because seems they are used for filtering and will not impact the whole process. When I configure ‘create item’ for that lookup column, I’m able to find the ‘BuildingAsset Id’ accordingly. for lookup type column, it’s similar to choice type column. We are not able to select the dynamic content directly. We should select ‘ColumnName/ID’ or ‘ColumnName/Value’ instead.

v-duann-msft_0-1617002805682.png

 

If I configure as above, I’m able to create that item with no issue.

 

Hope the content above may help you.

 

Best regards,

Anna

I figured it out!!

 

If you have a list, where one of the columns is a "lookup" column.  You need to run two (2) "Get Item" actions to get the item from the main table and the corresponding item from the lookup table.  One for the main item, which will offer the "ID" of the main list.  Then you need to call a second Get Item action using the "ID: as the input.

 

Leo_NYC_0-1617929546384.png

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,464)