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