web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Get value from lookup ...
Power Apps
Unanswered

Get value from lookup column

(0) ShareShare
ReportReport
Posted on by 265

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:
I have the same question (0)
  • Verified answer
    v-siky-msft Profile Picture
    on at
    Re: Get value from lookup column

    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard