cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Leander
Level: Powered On

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
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,119)