web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / ClearCollect - not col...
Power Apps
Unanswered

ClearCollect - not collecting data

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I am not getting data collected from the following formula and I can't get my head around why, any thoughts?...

 

OnVisible =

 

Set(***Cal,LookUp(Office365Outlook.CalendarGetTables().value, DisplayName = "***").Name);

Set(***Cal,LookUp(Office365Outlook.CalendarGetTables().value, DisplayName = "***").Name);

Set(***Cal,LookUp(Office365Outlook.CalendarGetTables().value, DisplayName = "***").Name);

 

ClearCollect(AllFutureEvents, ForAll(Office365Outlook.GetEventsCalendarView(***,DatePicker1.SelectedDate,DateAdd(DatePicker1.SelectedDate,23,Hours)).Values,{Start:Start,End:End,Location:Location,Subject:Subject,DisplayName:DisplayName}))

 

I am getting the headers but no data 😳

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @kcg633755 ,

    Based on the formula that you mentioned, I could not find any syntax error with it. Please consider modify your formula as below:

    Clear(AllFutureEvents);
    ForAll(
     Office365Outlook.GetEventsCalendarView(
    ***, DatePicker1.SelectedDate, DateAdd(DatePicker1.SelectedDate,23,Hours)).Values,
     Collect(
     AllFutureEvents,
     {
     Start: Start,
     End: End,
     Location:Location,
     Subject:Subject,
     DisplayName: DisplayName
     }
     )
    )

     

    Please also check if you have specified proper Calendar id value, start date value and end date value within above Office365Outlook.GetEventsCalendarView(...) function.

     

    You could consider bind the Office365Outlook.GetEventsCalendarView(...) formula to the Items property of the Gallery, then check if the Gallery could display proper event records from your Outlook.

     

    Best regards,

  • kcg633755 Profile Picture
    on at

    Thank you,

     

    I have tried modifying the formula as below and spotted that the format of dates needed to be updated to a UTC format.  I have tried this and still no change. The example given in the GetEventsCalendarView is 'startDateTimeOffset: 2020-01-01T08:00:00-07:00'. My Variable is coming out as: '2020-01-01T08:00:00.000Z. Could this be the issue and how to I rectify it?

     

    Here is the the whole OnStart formula:

     

    Set(***Cal,LookUp(Office365Outlook.CalendarGetTables().value, DisplayName = "***").Name);

    Set(ForRefCal,LookUp(Office365Outlook.CalendarGetTables().value, DisplayName = "***").Name);

    Set(***eventsCal,LookUp(Office365Outlook.CalendarGetTables().value, DisplayName = "***").Name);


    Set(UTCdts,Text(DatePicker1.SelectedDate,UTC));
    Set(UTCdte,Text(DateAdd(DatePicker1.SelectedDate,23,Hours),UTC));


    Set(MyUserId,Office365Users.MyProfile().Id);


    Clear(AllFutureEvents); ForAll(Office365Outlook.GetEventsCalendarView(***eventsCal,UTCdts,UTCdte).Values,Collect(AllFutureEvents,{Start:Start,End:End,Location:Location,Subject:Subject,DisplayName:DisplayName}));ForAll(Office365Outlook.GetEventsCalendarView(ForRefCal,UTCdts,UTCdte).Values,Collect(AllFutureEvents,{Start:Start,End:End,Location:Location,Subject:Subject,DisplayName:DisplayName}));ForAll(Office365Outlook.GetEventsCalendarView(***Cal,UTCdts,UTCdte).Values,Collect(AllFutureEvents,{Start:Start,End:End,Location:Location,Subject:Subject,DisplayName:DisplayName}))

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 638

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard