cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BrianHFASPS
Responsive Resident
Responsive Resident

Add item to List/Collection?

I have one dropdown that I use to filter a list in a second dropdown. This is my code:

Distinct(Filter('[dbo].[StuListSmall]',Grade='Covid Grade Dropdown_1'.SelectedText.Value),Section)

I want to add an option to top of list that is 'All'. I am sure there is some easy way to do this but I can't figure it out. I would prefer not to have to make a collection since with this it is cleaner and more dynamic. Thanks. 

1 ACCEPTED SOLUTION

Accepted Solutions
BrianHFASPS
Responsive Resident
Responsive Resident

So my fix was in first dropdown in OnChange I put this in:

ClearCollect(SectionList, {Result:"All"});Collect(SectionList,Distinct(Filter('[dbo].[StuListSmall]',Grade='Covid Grade Dropdown_1'.SelectedText.Value),Section))

Then my second dropdown just references the SectionList collection.  I guess that is the way to do it?

View solution in original post

1 REPLY 1
BrianHFASPS
Responsive Resident
Responsive Resident

So my fix was in first dropdown in OnChange I put this in:

ClearCollect(SectionList, {Result:"All"});Collect(SectionList,Distinct(Filter('[dbo].[StuListSmall]',Grade='Covid Grade Dropdown_1'.SelectedText.Value),Section))

Then my second dropdown just references the SectionList collection.  I guess that is the way to do it?

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,790)