cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
reinvdo
Regular Visitor

Text Input Control lacks .Text attributes

Dear Community,

I am trying to set the text in an TextInput control based on a selection in in a DropDown control.

Everybody writes: that one has to Set a variable to the desired text in the OnSelect of the DropDown control, Notify(TextInput.Text) and bind the TextInput.Text to the variable.

All nice and easy, BUT I can NOT find the .Text attribute of my TextInput controls: not in the drop-down menu with the attributes on the left, not in the attributes on the right. When I type TextInput.Text as a formula, I get an error: Power Apps encountered an internal error trying to evaluate this expression ...

What is going here?

Thanx for your help.

Kind regards,

reinvdo

2 ACCEPTED SOLUTIONS

Accepted Solutions
Drrickryp
Super User II
Super User II

@reinvdo 

I think you are l making this more complicated than it needs to be. Make the default property of the textinput control Dropdown.Selected.Value

You can replace Value with any field in the record chosen in the dropdown.

View solution in original post

RandyHayes
Super User III
Super User III

@reinvdo 

The TextInput control value is set by the Default property.  The .Text property is available then do refer to the actual value that is in it.

In other words, if you have your Textinput Default set to "Hi Text", then in other parts of your app you can refer to Textinput.Text and the result will be "Hi Text".  If someone types into the text input control, the the .Text will be whatever they have typed.

 

Skip the OnSelects in your dropdown and the variables as they will just create confusion in your app.  Keep it simple and put the formula you are using in the OnSelect directing in the Default property of the TextInput control.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

4 REPLIES 4
Drrickryp
Super User II
Super User II

@reinvdo 

I think you are l making this more complicated than it needs to be. Make the default property of the textinput control Dropdown.Selected.Value

You can replace Value with any field in the record chosen in the dropdown.

View solution in original post

Dear Drrickryp,

thanx for your swift answer. 

I have to calculate the text based upon the selected text in the OnSelect trigger attribute, so unfortunately, your solution does not work for me.

instead of .Text it is the .Default attribute that guides the text displayed in the TextInput?

Then why is all official Power Apps documentation (eg https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-text-input) mentioning the .Text attribute of TextInput control? 

Now I remembered I had a screen where I do the same, but in the particulare screen I wat working on it did not work... now hear this: deleting and re-copying the formula in the .Default attribute of the TextInput solved the problem!

Microsoft mysteries 😄

Kind regards,

reinvdo

RandyHayes
Super User III
Super User III

@reinvdo 

The TextInput control value is set by the Default property.  The .Text property is available then do refer to the actual value that is in it.

In other words, if you have your Textinput Default set to "Hi Text", then in other parts of your app you can refer to Textinput.Text and the result will be "Hi Text".  If someone types into the text input control, the the .Text will be whatever they have typed.

 

Skip the OnSelects in your dropdown and the variables as they will just create confusion in your app.  Keep it simple and put the formula you are using in the OnSelect directing in the Default property of the TextInput control.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Hi Randy,

thanx for your very clear explanation. Now, it just works!!!

Kind regards,

reinvdo

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,199)