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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (18,543)