cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
F_Quint
Helper IV
Helper IV

Filter Gallery by date equal or greater than now

Hi I have a SharePoint Calendar with a column called Start Time, and I'd like to filter my gallery items to only events where the start date is equal to or greater than now. 

 

I tried with the following formula on my gallery's items property, but nothing is displaying so I must have something wrong with it. 

 

 

SortByColumns(Filter('Change Management Calendar', 'Start Time' >= Now()), "Created", Descending)

 

 

F_Quint_0-1605819914857.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User III
Super User III

Hi @F_Quint ,

You have a Delegation warning on this as Date queries are not Delegable, However if what you are after is in the newest records, try this

With(
   {
      wCalendar:
      Sort(
         'Change Management Calendar',
         ID,
         Descending
      )
   },
   SortByColumns(
      Filter(
         wCalendar,
         'Start Time' >= Now()
      ),
      "Created",
      Descending
   )
)

You actually should not need the sort as the data sample will already be sorted this way.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

6 REPLIES 6
WarrenBelz
Super User III
Super User III

Hi @F_Quint ,

You have a Delegation warning on this as Date queries are not Delegable, However if what you are after is in the newest records, try this

With(
   {
      wCalendar:
      Sort(
         'Change Management Calendar',
         ID,
         Descending
      )
   },
   SortByColumns(
      Filter(
         wCalendar,
         'Start Time' >= Now()
      ),
      "Created",
      Descending
   )
)

You actually should not need the sort as the data sample will already be sorted this way.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Hi @WarrenBelz  yes, I'm after the newest records. I tried the formula you kindly provided but it did not work. 

 

F_Quint_0-1605821053464.png

 

@F_Quint ,

Sorry typing error now corrected - colon: needed instead of comma,

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Thanks again @WarrenBelz . Looks like the formula is incomplete. 

I tinker around with it and see if I can get it working. 

 

F_Quint_0-1605833762215.png

 

 

@F_Quint ,

Having a bad day on a small screen - it should work now.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

@WarrenBelz  it sure does. Thank you so much for your time and help!!!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (60,469)