I want a Dropdown to default to a shared group calendar from Outlook. I can currently see and access all the calendar options.
I need the Dropdown to 'default' to the desired Outlook calendar with the app/screen opens, causing the Calendar and the event, time and location fields to open, also.
Currently the user to choose from the list in the Dropdown before any of the other controls or fields appear.
The default calendar should be 'Truck Service Schedule Live'. When I manually add the desired calendar in the default and save, publish and open the app, the desired calendar is not the default on open.
I will set the Dropdown DisplayMode to 'Disabled' to prevent users from changing the calendar once this is resolved.
Dropdown Properties -
Default: "Truck Service Schedule Live"//_myCalendar.DisplayName
Items: Office365Outlook.CalendarGetTables().value
OnChange: Select(dropdownCalendarSelection1)
OnSelect: If(IsBlank(_userDomain),
UpdateContext({_showLoading: true});
Set(_userDomain, Right(User().Email, Len(User().Email) - Find("@", User().Email)));
Set(_dateSelected, Today());
Set(_firstDayOfMonth, DateAdd(Today(), 1 - Day(Today()), Days));
Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days));
Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, Months), -1, Days))
);
Set(_calendarVisible, false);
UpdateContext({_showLoading: true});
Set(_myCalendar, Self.Selected);
Set(_minDate, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days));
Set(_maxDate, DateAdd(DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days), 40, Days));
ClearCollect(MyCalendarEvents, Office365Outlook.GetEventsCalendarViewV2(_myCalendar.Name, Text(_minDate, UTC), Text(_maxDate, UTC)).value);
UpdateContext({_showLoading: false});
Set(_calendarVisible, true);
