cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Microsoft kasta
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
Kevmcdonk
Level: Powered On

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.

Luis8888
Level 8

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

 

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.
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.

Luis8888
Level 8

Re: trying to use $filter in Office365.CalendarGetItems

Thak you vivekb , I used it and it worked

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,511)