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
RusselThomas
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
RusselThomas
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
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

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

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (36,945)