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

Filter Browse Gallery using Date Picker & Filter Gallery

Hi All,

 

I would like to know if its possible to combine 2 formulas for the browse gallery.

1. Filter Gallery act as a filter for status.

2. Date Picker act as a date filter.

 

My formula for the Filter Gallery:

If(ThisItem.Title="Active",UpdateContext({type:"Active"}),If(ThisItem.Title="Pending",UpdateContext({type:"Pending"}),If(ThisItem.Title="Acknowledged",UpdateContext({type:"Acknowledged"}),If(ThisItem.Title="Resolved",UpdateContext({type:"Resolved"}),If(ThisItem.Title="Overall Alerts",UpdateContext({type:"Overall Alerts"}))))))

 

My formula for the Browse Gallery:

If(type="Overall Alerts", 'MS Teams Alerts', If(FilterGallery.Selected.TextBox1.Text="Active",Filter('MS Teams Alerts',type in Status),If(FilterGallery.Selected.TextBox1.Text="Pending",Filter('MS Teams Alerts',type in 'Admin Status'),If(FilterGallery.Selected.TextBox1.Text="Acknowledged",Filter('MS Teams Alerts',type in 'Admin Status'),If(FilterGallery.Selected.TextBox1.Text="Resolved",Filter('MS Teams Alerts',type in Status))))))

 

I would like to include this formula: 

Filter('MS Teams Alerts',Text('Date Received', "[$-en-US]mm-dd-yyyy")=Text(DatePicker1.SelectedDate, "[$-en-US]mm-dd-yyyy"))

 

For me to see my data per date and per status. Thank you.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Filter Browse Gallery using Date Picker & Filter Gallery

Hi @heydamianards ,

Where do you put your first formula? Within OnSelect property of your FilterGallery?

Do you want to combine your existing Filter formula with the DatePicker Filter formula?

 

Based on the needs that you mentioned, I think it is not necessary to type the FilterGallery.Selected.TextBox1.Text formula within your BrowserGallery.

 

I have made a test on my side, please take a try with the following workaround:

Set the OnSelect property of the Filter Gallery to following:

If(
    ThisItem.Title="Active",
    UpdateContext({type : "Active"}),
    ThisItem.Title= " Pending",
    UpdateContext({type : "Pending"}),
    ThisItem.Title = "Acknowledged",
    UpdateContext({type : "Acknowledged"}),
    ThisItem.Title = "Resolved",
    UpdateContext({type : "Resolved"}),
    ThisItem.Title = "Overall Alerts",
    UpdateContext({type: "Overall Alerts"})
)

 

Set the Items property of the BrowseGallery to following:

Filter(
       'MS Teams Alerts',
       If(
          type = "Overall Alerts",
          true,
          type = "Active" || type = "Resolved",
          type in Status,
          type = "Pending" || type = "Acknowledged",
          type in 'Admin Status'
       ),
       Text('Date Received', "[$-en-US]mm-dd-yyyy") = Text(DatePicker1.SelectedDate, "[$-en-US]mm-dd-yyyy")
)

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
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
Community Support Team
Community Support Team

Re: Filter Browse Gallery using Date Picker & Filter Gallery

Hi @heydamianards ,

Where do you put your first formula? Within OnSelect property of your FilterGallery?

Do you want to combine your existing Filter formula with the DatePicker Filter formula?

 

Based on the needs that you mentioned, I think it is not necessary to type the FilterGallery.Selected.TextBox1.Text formula within your BrowserGallery.

 

I have made a test on my side, please take a try with the following workaround:

Set the OnSelect property of the Filter Gallery to following:

If(
    ThisItem.Title="Active",
    UpdateContext({type : "Active"}),
    ThisItem.Title= " Pending",
    UpdateContext({type : "Pending"}),
    ThisItem.Title = "Acknowledged",
    UpdateContext({type : "Acknowledged"}),
    ThisItem.Title = "Resolved",
    UpdateContext({type : "Resolved"}),
    ThisItem.Title = "Overall Alerts",
    UpdateContext({type: "Overall Alerts"})
)

 

Set the Items property of the BrowseGallery to following:

Filter(
       'MS Teams Alerts',
       If(
          type = "Overall Alerts",
          true,
          type = "Active" || type = "Resolved",
          type in Status,
          type = "Pending" || type = "Acknowledged",
          type in 'Admin Status'
       ),
       Text('Date Received', "[$-en-US]mm-dd-yyyy") = Text(DatePicker1.SelectedDate, "[$-en-US]mm-dd-yyyy")
)

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
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

heydamianards
Level: Powered On

Re: Filter Browse Gallery using Date Picker & Filter Gallery

Hi @v-xida-msft 

 

This really helps. Thank you very much. 

 

Last query, I'm planning to include a textsearchbox on my app but how can i properly include it on my formula?

 

Thank you,

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Users online (9,954)