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
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,081)