cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper V
Helper V

Can't set text value based on dropdown

 I have a dropdown on a Powerapps form. I want to set the value of a text field based on the selection in the dropdown, but the text value is a different column in the source table.  My dropdown is called ddBU, the text values I want are in SP list 'SBU/BU' in the column 'Design Tech'.  Based on my selection in ddBU, the text field ('Design Tech') should be populated with the 'Design Tech' value in SP list 'SBU/BU'. How do I accomplish this? I'm pulling my hair out.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @ahhollan ,

What are the field types of 'Title', 'Design Tech' and 'Space Management Contact' fields?

If my understanding is right:

1. The text box is from 'Space Management Contact' field

2. you want the text box to display 'Design Tech' field value based on the selection of dropdown

Why don't you add 'Design Tech' field in the form?

 

Anyway, If the 'Design Tech' is text field, you can set the Text box Text property as below:

LookUp('SBU/BU', Title =ddBU.Selected.Result,  'Design Tech')

If this doesn't make sense, please share some screenshots and codes which can help me understand better.

Sik

View solution in original post

4 REPLIES 4
Super User
Super User

Set the textbox Text property to this (may need some tweaking):

 

Lookup('SBU/BU',ddBU = ddBU,'Design Tech')

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

 

Community Support
Community Support

Hi  @ahhollan ,

 

Which kind of dropdown are you using? combo box or drop down box?

Is there any relationship between the dropdown selection and text field text?

If you are using the combo box and just want the text field show 'Design Tech' when the dropdown is selected, please try this code.

 

If(Not(IsEmpty(ComboBox1.SelectedItems)),"Design Tech")

 

Snipaste_2020-01-07_16-11-50.pngSnipaste_2020-01-07_16-12-17.png

 

 

Sik

I'm using a dropdown instead of a combo box. 

 

Dropdown is set up with:

Card Default set to ThisItem.'SBU/BU'

Dropdown Items set to Sort(Distinct([@'SBU/BU'],Title), Result)

 

When dropdown selection is made, I have a textbox that needs to be populated based on SP list 'SBU/BU' field 'Design Tech'

 

Text box is setup with:

Card Default set to ThisItem.'Space Management Contact'  (Space Management Contact is the field to be updated in SP list 'Project Initiation (New)'

Card Update is set to ThisItem.'Space Management Contact'

Text field Text is set to LookUp('SBU/BU', Title =ddBU.Selected.Result, 'Space Management Contact')

 

Text field error message is 'Invalid Argument Type'

 

Thanks in advance for the help.

Hi @ahhollan ,

What are the field types of 'Title', 'Design Tech' and 'Space Management Contact' fields?

If my understanding is right:

1. The text box is from 'Space Management Contact' field

2. you want the text box to display 'Design Tech' field value based on the selection of dropdown

Why don't you add 'Design Tech' field in the form?

 

Anyway, If the 'Design Tech' is text field, you can set the Text box Text property as below:

LookUp('SBU/BU', Title =ddBU.Selected.Result,  'Design Tech')

If this doesn't make sense, please share some screenshots and codes which can help me understand better.

Sik

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (21,318)