cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Frequent Visitor

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

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (9,623)