cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Using Dropdown to Clear Text input Field

Hi All,

 

I have a dropdown X and a text input field Y. Dropdown X has two choices: a and b. I want when the user selects answer choice b, the text input field will erase all of what the user entered. When the user selects answer choice a, the information entered in the text input field will remain. Not sure exactly how to do this, so any help would be appreciated. Just want to know which settings I have to change and which formulas I need to input. Thanks in advance. 

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft
Microsoft

Hi robertwinn,

 

Set TextInputY;

Default property to

varInput

Reset property to

varResetInput

 

Set the DropDownX OnChange property to

If(DropdownX.Selected.Value="a", UpdateContext({varInput: TextInput1.Text}), UpdateContext({varInput: ""}));
UpdateContext({varResetInput: true});
UpdateContext({varResetInput: false})

 

 

Hope this helps,

 

RT

View solution in original post

1 REPLY 1
Microsoft
Microsoft

Hi robertwinn,

 

Set TextInputY;

Default property to

varInput

Reset property to

varResetInput

 

Set the DropDownX OnChange property to

If(DropdownX.Selected.Value="a", UpdateContext({varInput: TextInput1.Text}), UpdateContext({varInput: ""}));
UpdateContext({varResetInput: true});
UpdateContext({varResetInput: false})

 

 

Hope this helps,

 

RT

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.

Top Solution Authors
Top Kudoed Authors
Users online (93,883)