cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Leander
Frequent Visitor

Is there a way to get office365 calendar without an error when I check for two different Id's ?

I was personalizing the meeting capture sample.

 

I knew that I have to change the Variable "MyCalendarId" becaus of the language difference but we have some with the english Id "Calendar" and some wit the german "Kalendar".

Because of that I added another variable with the german Id.

 

This is a part of the OnStart code:

Concurrent(

    Set(MyCalendarID; LookUp(Office365.CalendarGetTables().value; DisplayName = "Calendar").Name);;
    Set(MyCalendarID2; LookUp(Office365.CalendarGetTables().value; DisplayName = "Kalender").Name);;

    ClearCollect(AllFutureEvents; Office365.GetEventsCalendarView(MyCalendarID2; Text(Today(); UTC); Text(DateAdd(Today(); 2; Days); UTC)).Values);;

    If(IsEmpty(AllFutureEvents); ClearCollect(AllFutureEvents; Office365.GetEventsCalendarView(MyCalendarID; Text(Today(); UTC); Text(DateAdd(Today(); 2;
Days); UTC)).Values));
Set(MyUserProfile; Office365Users.MyProfile().Id);     /*used to determine if meeting attendees are in app user's org*/ Set(MyDomain; Last(Split(User().Email; "@")).Result);
    /*used to determine countdown to end of selected meeting*/
Set(HomeTimerStart; Now()) );;

 

Now all User's wit the english Id are getting there entries, but also an error because the program checks first the german Id. So there is no matter if  I'm first checking the german or the english Id, the other group of users will get an error.

 

I also tried to use the IfError() funktion but it didn't work.

 

IfError(ClearCollect(AllFutureEvents; Office365.GetEventsCalendarView(MyCalendarID; Text(Today(); UTC); Text(DateAdd(Today(); 2; Days); UTC)).Values);

ClearCollect(AllFutureEvents; Office365.GetEventsCalendarView(MyCalendarID2; Text(Today(); UTC); Text(DateAdd(Today(); 2; Days); UTC)).Values));

 

So is there any way to get this without an error ?

1 REPLY 1
Leander
Frequent Visitor

I'm sorry for posting this 3 times but there were some problems at publishing this post. I don't know how to delete a post so please if you want to reply go to my profile and do that at the first post with the same title.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,995)