cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Microsoft
Microsoft

Re: Using Dropdown to Clear Text input Field

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
Highlighted
Microsoft
Microsoft

Re: Using Dropdown to Clear Text input Field

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (7,070)