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

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (8,341)