cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
drhansenr
Level: Powered On

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

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

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
drhansenr
Level: Powered On

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

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

View solution in original post

2 REPLIES 2
drhansenr
Level: Powered On

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

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

View solution in original post

drhansenr
Level: Powered On

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

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!

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,127)