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

Help populating text box based on value of drop down

How can I populate the value of a text box based on the value of a dropdown? The drop down has values from table1 and the text box will retreive its value from table2

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft Employee

Re: Help populating text box based on value of drop down

I simulated your lists in PA and everything went OK here. Let me show what I have done:

 

Screenshot_4.pngLayout of the applicationScreenshot_5.pngFirst button, to simulate the Drivers Timesheet ListScreenshot_6.pngSecond button, to simulate the Drivers Info ListScreenshot_7.pngDropdownScreenshot_8.pngFirst InputScreenshot_9.pngSecond Input

View solution in original post

22 REPLIES 22
Microsoft Employee

Re: Help populating text box based on value of drop down

You can use UpdateContext({ItemYouSelected: DropdownMenu.Selected }) in the OnChange property from the Dropdown. And after that you can use the filter in Table2 items with the ItemYouSelected.Value (or any property your item has).

TonyHart
Level 8

Re: Help populating text box based on value of drop down

@tbrantley,

 

There's also another way to do that. Set your text box Default field equal to the DropdownList.Selected.Value, and it will automatically update with the list.

tbrantley
Level: Powered On

Re: Help populating text box based on value of drop down

@TonyHart, @camel

 

I got it to populate home address with the value of the drop down. How would I retrieve home address and clock No from Driver Info based off the drop down box?

 

Capture3.PNG

Capture2.PNG

Microsoft Employee

Re: Help populating text box based on value of drop down

Something like this would work. Just add this to OnChange property from the Dropdown:

 

UpdateContext({Info : LookUp(DriverInfo,DropdownValue exactin Name)})

After setting the Info, you will need to set up the Default property from both 'Home Terminal Address' e 'Clock No' Text Boxes.

 

 

tbrantley
Level: Powered On

Re: Help populating text box based on value of drop down

@camel

 

Would I set the default property for 'Home Terminal Address' text box = Info?

Capture4.PNG

 

Capture1.PNG

Microsoft Employee

Re: Help populating text box based on value of drop down

You need to access the Column 'Home Address' from your Record. Something like this will probably work:

Info.'Home Address'
tbrantley
Level: Powered On

Re: Help populating text box based on value of drop down

@camel

 

Tried mutlple ways and still getting error

 

Capture1.PNGCapture3.PNGCapture2.PNG

Microsoft Employee

Re: Help populating text box based on value of drop down

@tbrantley can you please hover the yellow message sign and show the error message?

tbrantley
Level: Powered On

Re: Help populating text box based on value of drop down

@camel

 

It says "Invalid Name"

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (7,164)