Hi all,
I'm trying to build a calendar app, and I would to see today's events. I'm trying to use the latest version, V4CalendarGetItems with the $filter option, but I always get an error message of "invalid filter clause'.
I've tried all ways of formatting dates I could think about and it's not working. Any idea of what's wrong?
Below the code. Without the $filter param it works.
ClearCollect(ccEvents,
Office365.V4CalendarGetItems(ddCalendars.Selected.id,
{'$filter' : "start gt 2020-01-22T03:30:00.000Z and end lt 2020-01-24T03:30:00.000Z"}
).value)
Thanks!
Rafa
Solved! Go to Solution.
Hi
I finally got the solution, after reading tones of posts and blogs.
I found the "inspiration" in this topic: https://powerusers.microsoft.com/t5/Building-Flows/Outlook-quot-Get-calendar-view-of-events-quot-ord...
And the statement looks like this: "ClearCollect(ccItems,Office365.V4CalendarGetItems(ddCalendars.Selected.id,{'$filter':"start/DateTime gt '2020-01-22T00:00:00' and end/DateTime lt '2020-01-26T00:00:00'"}).value)"
Thanks for your help
You have to add datetime.
ClearCollect(ccEvents,
Office365.V4CalendarGetItems(ddCalendars.Selected.id,
{'$filter' : "start gt datetime'2020-01-22T03:30:00.000Z' and end lt datetime'2020-01-24T03:30:00.000Z'"}
).value)
Reference: https://stackoverflow.com/questions/24489458/odata-query-filter-for-datetime-range/31277779
Sik
As an alternative workaround.
ClearCollect(ccEvents,
Filter(Office365.V4CalendarGetItems(ddCalendars.Selected.id).value, start).value, DateTimeValue(start)> DateTimeValue("2020-01-22T03:30:00.000Z") && DateTimeValue(end)< DateTimeValue("2020-01-24T03:30:00.000Z")))
Sik
Hi
I finally got the solution, after reading tones of posts and blogs.
I found the "inspiration" in this topic: https://powerusers.microsoft.com/t5/Building-Flows/Outlook-quot-Get-calendar-view-of-events-quot-ord...
And the statement looks like this: "ClearCollect(ccItems,Office365.V4CalendarGetItems(ddCalendars.Selected.id,{'$filter':"start/DateTime gt '2020-01-22T00:00:00' and end/DateTime lt '2020-01-26T00:00:00'"}).value)"
Thanks for your help
User | Count |
---|---|
213 | |
94 | |
87 | |
49 | |
38 |
User | Count |
---|---|
271 | |
104 | |
103 | |
60 | |
59 |