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 Apps / Get value from lookup ...
Power Apps
Answered

Get value from lookup column

(0) ShareShare
ReportReport
Posted on by 294

Hi guys,

 

What is the syntax to get a value from a lookup column in Data Card ?

I created apps like this :

1. The 1st screen, a form with some fields which is a lookup column, so it will have a combo box

image.png

Those lookup column are created when I create Relationship from my Entity to other entity which are the master of it. So, like Site column, it is a Data type Lookup because has relationship to Entity: Sites, and so on.

 

2. In other page (next screen), I gathered all information into a collection, from some button "OnSelect" like this :

Collect(colEntry,
{ Site : DataCardValue3.Selected.'App Countings'.Site,
  Warehouse : DataCardValue4.Selected.'App Countings'.Warehouse,
  JournalType : DataCardValue5.Selected.'App Countings'.'Inventory Journal',
  Item : GalleryProducts.Selected.Name,
  Qty : 1,
  Status : "Good"
})

 

As you can see from how to collect, I retrieved the Site information from the previous screen with directly access the DataCardValue control. 'App Countings' is the Data source name. Whilst there is no error in the code, there is no data retrieved in the collection colEntry.

 

As I tried to show it in a Datatable control, it give me an error  saying those columns "Expected text value"

image.png

 

I'm guessing it is the way I retrieved the combox box from previous screen is wrong. What is the correct one ?

 

Thanks,

 

 

 

 

 

Categories:
  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Voltes ,

     

    There is something wrong with the collect function, please try this:

     

    Collect(colEntry,
    { Site : DataCardValue3.Selected.TargetColumn,
      Warehouse : DataCardValue4.Selected.TargetColumn,
      JournalType : DataCardValue5.Selected.TargetColumn,
      Item : GalleryProducts.Selected.Name,
      Qty : 1,
      Status : "Good"
    })

     

    The TargetColumn means the field value you want to get from lookup column.

    Hope this helps

    Sik

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 Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard