cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Microsoft
Microsoft

trying to use $filter in Office365.CalendarGetItems

I am trying to display calendar items in my app for given day and using office365.CalendarGetItems. It shows by default 512 calendar items, but I would like to apply filter to get the events for only given day . It seems to be $filter is not working. Even though I pass $filter  , it returns me all the records.

 

As it is not working for dates, I thoght I would try with simple filter like below

Office365.CalendarGetItems("Calendar",{'$filter':"Subject eq 'Walk'"}).value. This is also not working

 

I have two Questions here.

 

1) Does $filter work?

2) Reposne gives only 512 records . How do we get rest of the events.

 

I appreacite your help.

 

 

5 REPLIES 5
Highlighted
Frequent Visitor

Re: trying to use $filter in Office365.CalendarGetItems

Did you ever manage to get this working? Tried all sorts of things but always returns an error or all results.

Highlighted
Anonymous
Not applicable

Re: trying to use $filter in Office365.CalendarGetItems

I have the same problem Office365.CalendarGetItems  $filter just do not work, is it a bug ? or intended ?

 

Regards

 

Highlighted
Super User
Super User

Re: trying to use $filter in Office365.CalendarGetItems

I was able to create a gallery that only showed Calendar items that were going on at this current time.

 

Filter(Office365.CalendarGetItems("Calendar").value, Start <= Now() And End >= Now())


--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Highlighted
Super User
Super User

Re: trying to use $filter in Office365.CalendarGetItems

Hi @kasta

 

The $filter works if you se the V2CalendarGetItems functions

 

Office365.V2CalendarGetItems("Calendar", {'$filter': "start gt " & Text(DatePicker1.SelectedDate, UTC) & " and end lt " & Text(DateAdd(DatePicker1.SelectedDate,1,Days), UTC) }).value

DatePicker1 in this case is a date picker control that I inserted to check for different dates and it worked fine.

 

If you specifically want check only for today's date you can use

Office365.V2CalendarGetItems("Calendar", {'$filter': "start gt " & Text(Today(), UTC) & " and end lt " & Text(DateAdd(Today(),1,Days), UTC) }).value

@Jeff_Thorpe

The method that you specified would also work , the only issue being the time taken being around 4-5 seconds.

 

The $filter works almost instantly.

 

Hope this helps! 


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Anonymous
Not applicable

Re: trying to use $filter in Office365.CalendarGetItems

Thak you vivekb , I used it and it worked

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,861)