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
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
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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