cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pedrogom
Regular Visitor

Filter Calendar Events - Office 365 Outlook connector - V4CalendarGetItems

Hi Everyone!

 

I'm trying to feed a gallery with Calendar Events Items filtered by today's date: I want to see only the events that was scheduled today or before.

 

I'm trying this:

 

Office365Outlook.V4CalendarGetItems(varCalendario.id; {'$filter':"Start/DateTime le " & Text(Now(); DateTimeFormat.UTC); '$orderby':"Start/DateTime desc"}).value

 

I'm getting this error:

pedrogom_0-1601930355528.png

 

Ps: I'm in Brazil; here the separators are ";" instead of ","

 

Ps2: The code is working fine without the $filter argument (but it doesn't filter :D). I mean that the problem seems to be in the '$filter' argument:

pedrogom_1-1601930725568.png

 

 

 

 

2 REPLIES 2
summitb
Power Participant
Power Participant

I've tried using 

'$filter':"Start/DateTime le '" & Text(Now()) &"' "

Can you try this out

 

Office365Outlook.V4CalendarGetItems(LookUp(Office365Outlook.CalendarGetTablesV2().value,name<>"").id, {'$filter':"Start/DateTime le '" & Text(Now()) &"' ", '$orderby':"Start/DateTime desc"}).value

Might need to fix the , to ; . 

gvraaij
Frequent Visitor

This will get all the events from today and before today, in descending order:

Office365Outlook.V4CalendarGetItems(varCalendario.id; {'$filter':"start/DateTime le '"&Text(Today();"yyyy-mm-dd")&"T23:59:59'";'$orderby':"start/DateTime desc"}).value

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,004)