cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ganesan_gowri
Helper IV
Helper IV

cascading dropdowns reset

Having a two dropdowns . depending on the selection of the first dropdowns second dropdowns values will display.

So i want to reset the second dropdowns to be blank when everytime the first dropdown changes the values

 

the second dropdown Onselect--> i have this formula:

 

        ClearCollect(emp,{Val:""}); Collect(emp,If(Fac.Selected.fac ="IP",Distinct(Filter(tb_cd_emp, fac = Fac.Selected.fac),fact),Fac.Selected.fac ="ID",Distinct(Filter(tb_cd_emp, fac = Fac.Selected.fac),fact),SortByColumns(Distinct(tb_cd_emp),"Result"))

                                   Items--> emp

 

And In SAVE Button OnSelect:  i have this formula : --->UpdateContext({ResetVar: true}) to reset all the dropdowns by giving the Reset property---> to ResetVar it works well when we enter into the screen. 

 

So,my need is Now i want to reset the second dropdown depends on the value change in first dropdowns everytime. Please do help.

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @ganesan_gowri ,

Do you want to reset the second drop down to blank when you change the selected item of drop down1?

If so, you could use Clear() function to clear one collection to blank.

Then set this formula in the drop down1's OnChange, which will be triggered when drop down1 change the selected item.

You could set like this:
drop down1's OnChange:

Clear(emp)

 

Then when you change selected item in drop down1, emp collection will be cleared. Since drop down2 display emp, so it will then display blank.

If you click drop down2, then it will create collection emp like what you settings.

 

 

Best regards, 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Krishna92
Microsoft
Microsoft

@ganesan_gowri 

 

You can make use of the OnChange property of the drop down to track if there is any change happening on the Dropdown.

On the onchange you can setup the formula where you can reset the dropdown 2.

 

If the information helps you, please consider giving a thumbs up and mark the solution as resolved.

 

v-yutliu-msft
Community Support
Community Support

Hi @ganesan_gowri ,

Do you want to reset the second drop down to blank when you change the selected item of drop down1?

If so, you could use Clear() function to clear one collection to blank.

Then set this formula in the drop down1's OnChange, which will be triggered when drop down1 change the selected item.

You could set like this:
drop down1's OnChange:

Clear(emp)

 

Then when you change selected item in drop down1, emp collection will be cleared. Since drop down2 display emp, so it will then display blank.

If you click drop down2, then it will create collection emp like what you settings.

 

 

Best regards, 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,259)