Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

V3CalendarGetItem Recurring events

Posted on by

Hi all

 

I am new to this forum and hoping someone can help!

I’ve built an app to create meetings, and now included an option to create recurring events. 
I’d now like to add the ‘recurrence’ info to the calendar view I’ve built, but 

V3CalendarGetItem doesn’t seem to retrieve the data? Any ideas?

  • jstraumann Profile Picture
    jstraumann 39 on at
    Re: V3CalendarGetItem Recurring events

    Where does _myCalendar.id come from?

  • Verified answer
    P_jones Profile Picture
    P_jones on at
    Re: V3CalendarGetItem Recurring events

    @v-siky-msft thanks for all your help on this today. I've finally managed to sort it I think:

     

    the main gallery collection (_MyCalendarEvents) populates like this:

     

    Set(_minDate, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days));
    Set(_maxDate, DateAdd(DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days), 40, Days));
    ClearCollect(MyCalendarEvents, Office365Outlook.GetEventsCalendarViewV3(_myCalendar.id, Text(_minDate, UTC), Text(_maxDate, UTC)).value);

     

    Then at the gallery item level I have retrieved the series data like this:

     

    If(Not(IsBlank(ThisItem.seriesMasterId)),
    First(Filter(Office365Outlook.V4CalendarGetItems(_myCalendar.Name,{'$top':500}).value,id=ThisItem.seriesMasterId)).numberOfOccurences
    &" "&
    First(Filter(Office365Outlook.V4CalendarGetItems(_myCalendar.Name,{'$top':500}).value,id=ThisItem.seriesMasterId)).recurrence
    &" occurrences starting on "
    &DateValue(First(Filter(Office365Outlook.GetEventsCalendarViewV3(_myCalendar.Name, Text(_minDate, UTC), Text(_maxDate, UTC)).value,seriesMasterId=ThisItem.seriesMasterId)).start,"en-GB"))

     

    If anyone finds a cleaner way I'd love to hear it, otherwise I hope this helps someone else out!

  • P_jones Profile Picture
    P_jones on at
    Re: V3CalendarGetItem Recurring events

    ok - additionally to this, the V4getcalendaritems seems to only return the first event from a series, so I'm currently trying to figure out to combine the calendarview with calendaritems to achieve what I'm after

  • P_jones Profile Picture
    P_jones on at
    Re: V3CalendarGetItem Recurring events

    Thanks - I'm having more luck with v4calendargetitems, I'm struggling to get the filter to work now.

     

    I can't find any documentation on how to reference and column in the '$filter': clause, so that I can return the items matching the selected date

  • Verified answer
    v-siky-msft Profile Picture
    v-siky-msft on at
    Re: V3CalendarGetItem Recurring events

    Hi @P_jones ,

     

    Yes, I can reproduce your issue. I'm sure, but it could be a bug on GetEventsCalendarViewV3 output.

    Please change to use V4CalendarGetItems to get events details, that can show the recurrence info correctly. 

    Office365Outlook.V4CalendarGetItems("Calendar").value

     

    Sik

  • P_jones Profile Picture
    P_jones on at
    Re: V3CalendarGetItem Recurring events

    it really is weird - the event is definitely a recurring one (i checked it in outlook), but the collection just doesn't collect the data. In fact it puts an very old date in the recurrence end, and tells me it's not recurring at all

     

    P_jones_0-1599037513200.png

     

  • v-siky-msft Profile Picture
    v-siky-msft on at
    Re: V3CalendarGetItem Recurring events

    Hi @P_jones ,

     

    That's weird. 

    There should be recurrence, recurrenceEnd and numberOfOccurences columns (recurrence info) in output of GetEventsCalendarViewV3 action.  Please check it again in the collection.

    PS: I just find the Recurrence column in the snapshot you post above. 

    Snipaste_2020-09-02_16-36-14.png

    Sik

  • P_jones Profile Picture
    P_jones on at
    Re: V3CalendarGetItem Recurring events

    Hi Yes that's exactly what I want, but I can't seem to retrieve that info. I have: ClearCollect(MyCalendarEvents, Office365Outlook.GetEventsCalendarViewV3(_myCalendar.id, Text(_minDate, UTC), Text(_maxDate, UTC)).value);  but in the table 'MyCalendarEvents' there are no entries for the recurrence info

     

    P_jones_0-1599034484727.png

     

  • v-siky-msft Profile Picture
    v-siky-msft on at
    Re: V3CalendarGetItem Recurring events

    Hi @P_jones ,

     

    Do you mean you want to display the recurrence info, right?

     

    The recurrence and recurrenceEnd properties for the event from output of 'Office365Outlook.V3CalendarGetItem' action can show the recurrence Type and the end date of the recurrence.  Reference: GraphCalendarEventClientReceive 

    Snipaste_2020-09-02_11-44-49.png

    Hope this helps.

    Sik

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,246

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,884

Leaderboard