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 / the column name is var...
Power Apps
Answered

the column name is variable

(0) ShareShare
ReportReport
Posted on by 140

in my app i have 2 combobox that the user choose from them 

combobox 1 : contains all distinct values of column1 in Database1

combobox 2 :  contains  several columns names from Database1

 

In Text label I want to have the value in record chosen in combobox1 from the column chosen in combobox 2

as the example in the image

Hanankhamissy_0-1693229232936.png

 

in the text label ---->Text property i use the following :

LookUp(DataBase1,'number'=combobox1.Selected.Value).combobox2.selected.value

the red part of the formula not working 

Help please

 

Categories:
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @Hanan-khamissy,

     

    Dynamically displaying the column in such a manner is currently not possible within Canvas Apps. A workaround to this would be using a condition to map the correct column name by checking the combobox selection:

     

    LookUp(
     DataBase1,
     'number' = combobox1.Selected.Value,
     Switch(
     combobox2.selected.value,
     //The matched value
     "A1",
     //The column name
     A1,
     //Matched value...
     "A2",
     A2,
     "A3",
     A3
     )
    )

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • Hanan-khamissy Profile Picture
    140 on at

    It works thank you 

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

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard