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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Populating label or te...
Power Apps
Unanswered

Populating label or text input fields on one screen based on a listbox item selection on another

(0) ShareShare
ReportReport
Posted on by 11

I am creating a PowerApp consisting of several screens, only two of which are relevant here. The first (an app dashboard) contains two listboxes, one (screen name "AppDashboard", listbox name "lbClients") containing client names from a list containing client names from a SharePoint list of client data. The second (not relevant here) contains a list of project/engagement names that gets populated with a list of associated engagement names when a client name is selected. At the bottom of the screen is a set of buttons, each triggering display of a different screen corresponding to an operation to be performed when the button is clicked (display basic client informaton, edit basic client informaton, etc.).  See screenshots below.

 

The operation I'm concerned with at the moment is display of basic client information in the screen named "View Basic Client Information View". There is a button on the initial dashboard page labeled "View Basic Client Information". When a client name in the dashboard listbox is clicked, the app navigates to the basic client information view screen containing a set of field labels and corresponding read-only field name label or text input controls (set to "View") (I've tried both) where I want to display the corresponding data element for the selected client populated into the control.

 

 

Here's my question:

 

What is the syntax of the statements I should put into the "Text" property of the label control or the "Default" value of the text input control? While trying to get this to work, I have a  label control called "dispClientName" and a text input control called "txtClientName" (I dont care which control type I use as long as it works) that will contain the client name selected on the dashboard page (as well as a number of of other text fields I will populate in the same way later that I want to  pull from the same data source specified in the Items property referenced by the listbox on the dashboard "home" screen.

 

I've tried all of the following in the in the Text field of te label control and the "Default" field of the text input control, and none work:

 

AppDashboard.lbClients.Items.SelectedItems.Client_x0020_Name
AppDashboard.lbClients.Items.SelectedItems."Client Name"
lbClients.Items.SelectedItems."Client Name"
lbClients.Items.SelectedItems.Client_x0020_Name
AppDashboard.lbClients.SelectedItems.Client_x0020_Namedashboard1.jpgclientdatadisplay1.jpg
AppDashboard.lbClients.SelectedItems."Client Name"
lbClients.SelectedItems."Client Name"
lbClients.SelectedItems.Client_x0020_Name

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    drhansenr Profile Picture
    11 on at

    Found the answer myself. Just need to set the label "text" or textbox "default" value to lbClients.Selected.Value

  • drhansenr Profile Picture
    11 on at

    A follow up...

     

    Setting the "Text" value of the Label control we discussed to "lbClients.Selected.Value" succeeded in displaying the selected value in the ListBox control of the other screen. And with one exception, I was able to populate the other fields from the same list record using lbClients.Selected.[column name].

     

    But there is one field, a label named "Company Description" containing he value "My Description" which is the same as all the others except that I increased it's height to allow multiple lines to be displayed. But instread of displaying "My Description", it displays "<div class="ExternalClass08ADC9B5C93045E897549008852A4BBA"><p>M​y Description<br></p></div>".

     

    Can anyone explain why this would happed and how I correct it?

     

    Thanks!

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard