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 / Getting information fo...
Power Apps
Answered

Getting information form a DataTable to Text Box's

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hey all, need some help. I have been trying to get information form a Data Table and populate a bunch of textboxes when the user presses the Edit button. 

I have used the txtBrand.Text = dtDeviceInfo.Selected.Brand but nothing shows up and I have been researching through this site and can't seem to find a way to do this. 

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    Can you please confirm where you are putting this value for the DataTable selected item? I carried out a simple test on my side and it worked fine.
     
    I have made a reference to Data Table selected item on the label, but using below mentioned formula on Text property of label:
    Expression: 
    DataTable1.Selected.Education
    Here DataTable1 refers to the name of my DataTable and the Education is the attribute that I want to refer to.\MicrosoftTeams-image (141).png

     

    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Sorry for taking a while to reply the issue is I need it done when the user hits the edit button. 

    So within btnEdit.OnSelect I have the code 

    txtBrand.Text = dtDeviceInfo.Selected.Brand

    Which then does nothing when the button is pressed

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @Anonymous 

     

    This is happening because you cannot set control text directly, for doing so, please follow below steps:
     
    Button -> OnSelect -> Set(SelectedBrand, dtDeviceInfo.Selected.Brand)
     
    Label -> Text -> SelectedBrand
     
    Using a variable you can directly set the reference to update value.
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I just tried your response but the issue is that I am using a text box and not a lable as this is also used as an input method. 

    The text box does not have the TEXT property in the pull downAnnotation 2019-07-02 160831.png

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @Anonymous 

     

    For a Text Input control, you need to place this expression on the "Default" property.
     
    Hope this Helps!
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    So easy how did I not know that

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard