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

Formula to filter a gallery via button

Dear all

 

I have somehow built a functioning timesheet with a lot of help from this community, but in my design, I didn't think about scrolling through the gallery as the year progressed. The gallery list is made up of the working days of the year.

  

So I have added in a menu screen with buttons (see e.g.1) and I'm looking for some help to write a formula which will filter my gallery from a button, so the gallery shows only the days of the month you select. 

 

My gallery has the following fields (see e.g.2):

  • Body1 = A unique number used to order the list of working days = ThisItem.ID
  • Title2 = A text description of the day/date using three column = ThisItem.Day & " " & ThisItem.Date & " " & ThisItem.Month
  • Subtitle2 = A formula summing the number of hours logged for that day = Text(Value(Hours_1)+Value(Hours_2)+Value(Hours_3)+Value(Hours_4)+Value(Hours_5)+Value(Hours_6)+Value(Hours_7)+Value(Hours_8)) & " " & "hours logged"

 

How can I write a formula, so that when a button is pressed it filters the gallery to just show entries for a single month?

 

Logically I would want to write something in OnSelect like: 

 

Filter based on a unique number

Navigate(BrowseGallery1,Fade)Filter,Body1,range=240,260

 

Or

 

Filter based on unique text

Navigate(BrowseGallery1,Fade)Filter,Title2,contains"August"

 

But I have no idea how to express this in PowerApps... Any ideas what I need to write?

 

Thanks in advance..

Stuart

1 REPLY 1
Community Support Team
Community Support Team

Re: Formula to filter a gallery via button