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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Office3650utlook.GetEv...
Power Apps
Unanswered

Office3650utlook.GetEventsCalendarViewV3 failed: Invalid Values

(1) ShareShare
ReportReport
Posted on by 87

I have created a simple app that displays my invites in one of my selected calendars.  For each invite the invitees status is displayed.

 

When starting the app the following error messages are displayed.

(x) Office3650utlook.GetEventsCalendarViewV3 failed: The function 'GetEventsCalendarViewV3' has an invalid value for parameter 'calendarld' - a blank value was passed to it where it was not expected. Please make sure that a valid argument is passed to the function.X
(x) Office3650utlook.GetEventsCalendarViewV3 failed: The function 'GetEventsCalendarViewV3' has an invalid value for parameter 'startDateTimeUtc' - a blank value was passed to it where it was not expected. Please make sure that a valid argument is X passed to the function.
(x) Office3650utlook.GetEventsCalendarViewV3 failed: The function 'GetEventsCalendarViewV3' has an invalid value for parameter 'endDateTimeUtc' - a blank value was passed to it where it was not expected. Please make sure that a valid argument is X passed to the function.

Once the app starts, the errors are cleared and all works as expected.

My OnStart script:

Set(DefaultDaysBefore,1); // when to start the listing of calendar events before today
Set(DefualtDaysAfter, 9); // when to end the listing of calendar events after today
Set(CalList,Office365Outlook.CalendarGetTablesV2().value); // CalList an object with Calender ID, Name and owner
Set(MyCalendarID,CalendarDropDown.Selected.id); // A dropdown to select the calendar to display in the gallery

// Beginning and ending days to display in the gallery
Set(UTCNow,Text(DateAdd(Today(),-Abs(DefaultDaysBefore),TimeUnit.Days),DateTimeFormat.UTC));
Set(UTCNext,Text(DateAdd(Today(),Abs(DefualtDaysAfter),TimeUnit.Days),DateTimeFormat.UTC));

 

CalendarDropDown configuration:

Items: CalList // defined in App.OnStart
Default: First(CalList).id

Gallery.Items (The only instance of GetEventCalendarViewV3 - See errors generated above)

Sort(Office365Outlook.GetEventsCalendarViewV3(CalendarDropDown.Selected.id,UTCNow,UTCNext).value,start) 

 

It seems that the gallery items property tries to run prior to the initialization of the required variables that are defined in the OnStart and Default for the DropDown

    CalendarDropDown.Selected.id,UTCNow,UTCNext

 

Any ideas? 

 

Again, once the app is running and the initial errors are cleared, all works as expected.

 

As always, thank you for your time.

Alex Lindberg

Categories:
I have the same question (0)
  • AlexLindberg Profile Picture
    87 on at

    I have tried your solutions without any luck. The issue is that gallery is looking for field values in the record. 

     

    I have tried the following for the gallery's Items property trying to capture the null fields but this is also failing.

    Sort(
     Office365Outlook.GetEventsCalendarViewV3(
     If(
     !IsBlank(CalendarDropDown.Selected.id),
     CalendarDropDown.Selected.id,
     First(CalList).id // set in OnStart
     ),
     If(!IsBlank(UTCNow),UTCNow,Text(DateAdd(Today(),-Abs(DefaultDaysBefore),TimeUnit.Days),DateTimeFormat.UTC)),
     If(!IsBlank(UTCNext),UTCNext,Text(DateAdd(Today(),Abs(DefaultDaysAfter),TimeUnit.Days),DateTimeFormat.UTC))
     ).value,
     start
    )

     

    Any way to delay the first screen, and hence delay the gallery from populating?

  • rzuber Profile Picture
    545 Moderator on at

    They are causing errors because nothing is selected at startup. Just wrap an IfError() around the GetEventsCalendarViewV3() calls.

     

    IfError(
     GetEventsCalendarViewV3(...),
     []
    )

     

     

    You could also do

     

    If(
     !IsBlank(CalendarDropDown.Selected),
     Sort(
     Office365Outlook.GetEventsCalendarViewV3(CalendarDropDown.Selected.id, UTCNow, UTCNext).value,
     start
     ),
     []
    )

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 401

#2
WarrenBelz Profile Picture

WarrenBelz 334 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 325 Super User 2025 Season 2

Last 30 days Overall leaderboard