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

Adding a filter based on relative Date to the Browse Gallery

Hello

 

This is the Items property for my Browse Gallery and the way I understand this is that it Filters by the text entered in the Search Box and Sort the Gallery in Descending Order based on the Title


SortByColumns(Filter('Gestion des événements'; StartsWith(Title; TextSearchBox1.Text)); "Title"; If(SortDescending1; Descending; Ascending))

 

PowerApps_Item Property.PNG

 

 

 

If I want it to filter on the text the same way BUT Sort the Gallery according to the Event Date Date starting today and going forward and not showing the past events, how would I go about that? I have no knowledge of coding and am novice in PowerApps

 

Thanks in advance

 

3 REPLIES 3
Community Support Team
Community Support Team

Re: Adding a filter based on relative Date to the Browse Gallery

Hi @Hockeymom,

 

Do you want to filter events whose Event Date is starting today and not show the past events?

Could you please share a bit more about the data source ('Gestion des événements') within your app?

 

I assume that the data source within your app is a SP list, and there is a Event Date column (Date type column) within it. I have made a test on my side, please take a try with the following workaround:2.JPG

 

Set the Items property of the Gallery control to following formula:

SortByColumns(
Filter('20180714_case2',StartsWith(Title,TextInput1.Text),Event_x0020_Date>=Today()),
"Title",
Descending
)

Note: The '20180714_case2' represents the SP list data source within my app.

 

On your side, you should take a try with the following formula:

SortByColumns(
      Filter(
         'Gestion des événements',
          StartsWith(Title,TextSearchBox1.Text),
          Event_x0020_Date>=Today()
       ),
      "Title",
      If(SortDescending1,Descending,Ascending)
)

Note: The Event Date represents the Event Date column within your data source.

 

Please also check if the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/General-Discussion/Filter-gallery-of-Sharepoint-list-by-date/td-...

 

More details about the Filter function in PowerApps, please check the following article:

Filter function

 

 

Best regards,

Kris

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.
Hockeymom
Level: Powered On

Re: Adding a filter based on relative Date to the Browse Gallery

Hello and sorry for the delay in replying.

Yes it is a Sharepoint list that starts from a sharepoint calendar and the column I want to filter on is the Eventdate column. However I am in French here, does that matter?

 

This is the Properties formula I had and that showed all the events and that I want to show only the events that occur from Today and onward.

Powerapps1.PNG

Now when I apply the filter as you propose it returns not results whatsoever when there shoud be 2 events (16th and 19th)

Powerapps2.PNG

 

I only want it to filter by today going forward without showing the past events. It does not have to search by date, in fact if it could search by name AND filter by dat that would be perfect.

 

Thanks in advance

Hockeymom
Level: Powered On

Re: Adding a filter based on relative Date to the Browse Gallery

hi I am really getting desperate for this, could I bother you for some more help please?

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 115 members 4,593 guests
Please welcome our newest community members: