cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Patching cascading dropdowns

2 cascading dropdowns (dd) that filter my gallery.  First dd iis called dbxfilterBAG and contains data from a column called BAG in a SP list called All Volunteers. the second dd is call dbxfilterTrade and uses the SP column called 'Main Trade'

 

If I choose  "Builder" from the dbxfilterBAG dd then my second dd called dbxFilterTrade shows plumber , electrician, carpenter but defaults to electrician and gallery shows electrician result. I have to manually cycle through plumber and carpenter using dbxfilterTrade dd. I want to patch "All" into dbxFilterTrade and have it as Default..

 

So, If i choose Builder then dbxFilterTrade dd will default to "All" and gallery will list plumber ,electrician, carpenter jobs.  

 

Code in dbxFilterTrade so far....

Distinct(

    Filter(

        'All Volunteers List',

        'BAG'.Value = dbxFilterBAG.SelectedText.Value

    ),

    'Main Trade'.Value

)

 

Many thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Hi @Tez ,

To get "All" at the top of the drop-down list, you need a collection. You would run this at the OnChange of the first drop-down

ClearCollect(
   colTrade,
   {Result:"All"}
);
Collect(
   colTrade,
   Distinct(
      Filter(
         'All Volunteers List',
         'BAG'.Value = dbxFilterBAG.SelectedText.Value
      ),
      'Main Trade'.Value
   )
)

The Items of the second drop-down would be colTrade and All"would be at the top (and defaulted if this is a drop-down control (not a combo box).

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

1 REPLY 1
Highlighted
Super User III
Super User III

Hi @Tez ,

To get "All" at the top of the drop-down list, you need a collection. You would run this at the OnChange of the first drop-down

ClearCollect(
   colTrade,
   {Result:"All"}
);
Collect(
   colTrade,
   Distinct(
      Filter(
         'All Volunteers List',
         'BAG'.Value = dbxFilterBAG.SelectedText.Value
      ),
      'Main Trade'.Value
   )
)

The Items of the second drop-down would be colTrade and All"would be at the top (and defaulted if this is a drop-down control (not a combo box).

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,469)