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 / Lookup result refer to...
Power Apps
Answered

Lookup result refer to other label

(0) ShareShare
ReportReport
Posted on by 145

Hello,

 

i would like to ask, if have a my problem any solution.

 

I have Label1 where name of SQL column is made from Concatenate text and Dropdown.

 

I have this lookup function in other Label2

LookUp(CachedBallances, ComboBox3.Selected.helpEtalon = CodeBalance, here i need refer to Label1 with column name)

 

If i use LookUp(CachedBallances, ComboBox3.Selected.helpEtalon = CodeBalance, Label1.Text) in Label2 i have name of the column but i need his value.

 

Exist any way?

Thank you very much

Br

Jakub

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Flashback 

    You cannot refer to objects, columns, filed names, controls, etc. by reference in PowerApps.

    You can vote on this Idea in the idea forum. 

     

    What you can do is devise a formula to swith off of the value in your label, such as this:

    LookUp(CachedBallances,
     CodeBalance = ComboBox3.Selected.helpEtalon &&
     Switch(Label1.Text,
     "columnA", columnA = something,
     "columnB", columnB = something
     )
    )

     

    Replace strings with your label values and column names and criteria with yours and this will give you what you want as a workaround.

     

    I hope this is helpful for you.

  • Flashback Profile Picture
    145 on at

    Im new in powerapps and im not sure if understand...

     

    I try this:

     

    LookUp(CachedBallances,CodeBalance = ComboBox3.Selected.helpEtalon &&
    Switch(Label1.Text, "TargetValueEtalon4", TargetValueEtalon4,"TargetValueEtalon5", TargetValueEtalon4))

     

    But i still receive error "Expected Text value"

     

    "TargetValueEtalon4" is name of column in SQL (decimal place type) and TargetValueEtalon4 - here i need value from this column (for example 1.000)

     

    What i have wrong?

     

    Thank you

    BR

    Jakub

     

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Flashback 

    Welcome to PowerApps!!

     

    So the issue you have is not with the LookUp formula, it is that you seem to be putting this in a Label text property.

    If that is the case, LookUp returns a Record.  Text expects a text value.  

    So, you need to change your LookUp to choose the column you actually want to display in your label:

    LookUp(CachedBallances,
     CodeBalance = ComboBox3.Selected.helpEtalon &&
     Switch(Label1.Text, 
     "TargetValueEtalon4", TargetValueEtalon4,
     "TargetValueEtalon5", TargetValueEtalon4
     ),
     theColumnYouWantHere
    )

    Replace theColumnYouWantHere with the name of the column you want to display.

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 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard