cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AKB_2K
Level: Powered On

Creating cascading distinct drop-down with additional "All" option.

Hello,

I have created a gallery named as TicketList which is populating data from SharePoint list. I have additional drop-down "Month" which shows all months in a year along with additional drop-down option "All". Selecting All option shows all items of SharePoint list whereas selecting "Month" filters the Ticket list based on item creation month. Items for this Month drop-down are being shown using a Table created during App start.

I want to create additional filter "Application" which will dynamically generate list of Applications for which ticket were raised in selected "Month". For e.g select May in first drop-down, display all applications in second drop-down. These 2 drop-down jointly filter "TicketList" gallery items.

Major road block which I am facing right now -Showing distinct values in "Application" drop-down based on "Month" drop-down selection value, along with an additional drop-down value "All". Selection of All value in either Application or Month drop-downs should show all list items in TicketList gallery.

Is this possible in PowerApps or am I asking too much?
1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Level 10

Re: Creating cascading distinct drop-down with additional "All" option.

Hi @AKB_2K ,

Do you want if the dropdown1 select May,drop down2 select Month, the gallery will display items only in May;

                     if the dropdown1 select May,drop down2 select All, the gallery will display all items?

I suggest you use if statement.

Could you tell me what's the field's data type that you want to filter according to?

I've made a similar test for yoyr reference:

I use the field named created to filter data and its data type is date.

1)Set drop down1's Items: Distinct(fruit,Month(Created))

2)Set drop down2's Items: ["all","month"]

3)Set the gallery's Items:

If(Dropdown2.Selected.Value="all",tablename,
Dropdown2.Selected.Value="month",Filter(tablename,Month(Created)=Dropdown1.Selected.Result)
)

614.png

 

 

 

Best regards,

Community Support Team _ Phoebe Liu

2 REPLIES 2
Highlighted
leyburn19
Level 10

Re: Creating cascading distinct drop-down with additional "All" option.

Shows us teh gallery filter to look at.

 

I do some gallery filters based on mutiple selections but it depends on the fields to be found

v-yutliu-msft
Level 10

Re: Creating cascading distinct drop-down with additional "All" option.

Hi @AKB_2K ,

Do you want if the dropdown1 select May,drop down2 select Month, the gallery will display items only in May;

                     if the dropdown1 select May,drop down2 select All, the gallery will display all items?

I suggest you use if statement.

Could you tell me what's the field's data type that you want to filter according to?

I've made a similar test for yoyr reference:

I use the field named created to filter data and its data type is date.

1)Set drop down1's Items: Distinct(fruit,Month(Created))

2)Set drop down2's Items: ["all","month"]

3)Set the gallery's Items:

If(Dropdown2.Selected.Value="all",tablename,
Dropdown2.Selected.Value="month",Filter(tablename,Month(Created)=Dropdown1.Selected.Result)
)

614.png

 

 

 

Best regards,

Community Support Team _ Phoebe Liu