cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: cascading dropdowns reset

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
Highlighted
Microsoft
Microsoft

Re: cascading dropdowns reset

@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.

 

Highlighted
Community Support
Community Support

Re: cascading dropdowns reset

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,904)