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

How do I reset values when I change dropdown choices?

In my PowerApp, I choose from a dropdown menu what type of item I am purchasing.

However, if I change my mind and want a different type of item, I want the price field to be reset.

Right now, it stays the way I entered it whenever I change anything else in the form.

 

Help please? Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi@PurpleHaze,

Based on the issue that you mentioned, do you want to reset the TextInput based on the Dropdown selected?

As you said, you want to reset the price field once you change the selection from the Dropdown.


@PurpleHaze wrote:

In my PowerApp, I choose from a dropdown menu what type of item I am purchasing.

However, if I change my mind and want a different type of item, I want the price field to be reset.


I have a test on my side, please take a try as below.

Set the Dropdown OnChange property as below.

 

UpdateContext({ resetVar: true }); UpdateContext({ resetVar: false })

 

Set the Reset property of the TextInput as below.

 

resetVar

 

You can check the GIF for reference.

0723Gif1.gif

Best Regards,

Qi

Best Regards,
Qi

View solution in original post

5 REPLIES 5
jlindstrom
Super User
Super User

what exactly are you doing when the dropdown changes? Are you filtering a gallery or using a drop-down for data on a form?

Drop-down for data on a form.

jlindstrom
Super User
Super User

just to clarify, are you replacing the control in the data card on the form with a drop-down?

 

Select the data card on the form that you want to set when the value of the drop-down changes

change the default of the data card (not the field control) on the data card to the value of the drop-down

v-qiaqi-msft
Community Support
Community Support

Hi@PurpleHaze,

Based on the issue that you mentioned, do you want to reset the TextInput based on the Dropdown selected?

As you said, you want to reset the price field once you change the selection from the Dropdown.


@PurpleHaze wrote:

In my PowerApp, I choose from a dropdown menu what type of item I am purchasing.

However, if I change my mind and want a different type of item, I want the price field to be reset.


I have a test on my side, please take a try as below.

Set the Dropdown OnChange property as below.

 

UpdateContext({ resetVar: true }); UpdateContext({ resetVar: false })

 

Set the Reset property of the TextInput as below.

 

resetVar

 

You can check the GIF for reference.

0723Gif1.gif

Best Regards,

Qi

Best Regards,
Qi

View solution in original post

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,165)