web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / "Unknown Error occured"
Power Apps
Answered

"Unknown Error occured"

(0) ShareShare
ReportReport
Posted on by 391

Hey all, 
I am using the outlook connector, as well as a sharepoint connector.
I am attempting to create an outlook event, while simultaneously putting that event into an SPlist.

My code shows no errors, then when I run it, it says "unknown error occurred".

Anyone have any idea what the problem might be? Do outlook and SPList not play nicely together?
Code is below! 

 

Office365Outlook.V4CalendarPostItem(
 LookUp(
 Office365Outlook.CalendarGetTables().value,
 DisplayName = "Calendar"
 ).Name,
 SubjectInput.Selected.JobNumberAndName,
 DateAdd(
 DateTimeValue(StartDatePicker.SelectedDate & " " & StartHour.SelectedText.Value & ":" & StartMinute.SelectedText.Value & ddAPStart.SelectedText.Value),
 TimeZoneOffset(),
 TimeUnit.Minutes
 ),
 DateAdd(
 DateTimeValue(EndDatePicker.SelectedDate & " " & EndHour.SelectedText.Value & ":" & EndMinute.SelectedText.Value & ddAPEnd.SelectedText.Value),
 TimeZoneOffset(),
 TimeUnit.Minutes
 ),
 "(UTC) Coordinated Universal Time",
 {
 body: Body.HtmlText,
 location: SubjectInput.Selected.JobNumberAndName,
 responseRequested: Checkbox3_1.Value,
 requiredAttendees: Concat(
 ComboBox3.SelectedItems,
 Mail,
 ";"
 )
 }
);
Patch(
 'Scheduling 4 App',
 Defaults('Scheduling 4 App'),
 {
 JobSite: SubjectInput.Selected.JobNumberAndName,
 Employees: ComboBox3.Selected.DisplayName,
 StartDate: StartDatePicker,
 EndDate: EndDatePicker,
 Notes: Body
 }
);
Reset(Body);
Reset(ComboBox3);
Reset(SubjectInput);
Reset(StartDatePicker);
Reset(EndDatePicker);
Reset(StartHour);
Reset(StartMinute);
Reset(EndHour);
Reset(EndMinute);
Reset(ddAPEnd);
Reset(ddAPStart)

 

Categories:
I have the same question (0)
  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    Hi @CodyO 

    In your LookUp:

    LookUp(
     Office365Outlook.CalendarGetTables().value,
     DisplayName = "Calendar"
     ).Name


    Could you try: 

    LookUp(
     Office365Outlook.CalendarGetTablesV2().value,
     DisplayName = "Calendar"
     ).Name
  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @CodyO ,

    First of all, open a monitor session to see what action is throwing that error and what supplementary info about error you can collect. 

    gabibalaban_0-1710952408139.png

     

  • CodyO Profile Picture
    391 on at

    @gabibalaban Okay, I ran the monitor while testing the app, and it shows success through it all, but it did stop at lookUp, so I am assuming what @DJ_Jamba might be something to work with! Thoughts? 

    CodyO_0-1710952675629.png

     

  • CodyO Profile Picture
    391 on at

    @DJ_Jamba I attempted your fix, and it is showing an error, am I missing something? I did have to change a few things to make the code work initially.

    CodyO_0-1710955845546.png

    Office365Outlook.V4CalendarPostItem(
     LookUp(
     Office365Outlook.CalendarGetTablesV2().value,
     DataSourceInfo.DisplayName = "Calendar"
     ).name,
     SubjectInput.Selected.JobNumberAndName,
     DateAdd(
     DateTimeValue(StartDatePicker.SelectedDate & " " & StartHour.SelectedText.Value & ":" & StartMinute.SelectedText.Value & ddAPStart.SelectedText.Value),
     TimeZoneOffset(),
     TimeUnit.Minutes
     ),
     DateAdd(
     DateTimeValue(EndDatePicker.SelectedDate & " " & EndHour.SelectedText.Value & ":" & EndMinute.SelectedText.Value & ddAPEnd.SelectedText.Value),
     TimeZoneOffset(),
     TimeUnit.Minutes
     ),
     "(UTC) Coordinated Universal Time",
     {
     body: Body.HtmlText,
     location: SubjectInput.Selected.JobNumberAndName,
     responseRequested: Checkbox3_1.Value,
     requiredAttendees: Concat(
     ComboBox3.SelectedItems,
     Mail,
     ";"
     )
     }
    );
  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    OK - In a new blank screen, throw a button onto the canvas and in the OnSelect property enter this:

    ClearCollect(col_Calendars, Office365Outlook.CalendarGetTablesV2().value)

     

    Run the app, click on the button, then look at the collection via the variables icon.
    What do you see in the collection?

  • Verified answer
    CodyO Profile Picture
    391 on at

    @DJ_Jamba @gabibalaban It is working! I had to change a few things, it wasn't being specific but I realized I was missing some key parameters in my patch statement. 

    Patch(
     'Scheduling 4 App',
     Defaults('Scheduling 4 App'),
     {
     JobSite: SubjectInput.Selected.JobNumberAndName,
     Employees: ComboBox3.Selected.DisplayName,
     StartDate: StartDatePicker.SelectedDate,
     EndDate: EndDatePicker.SelectedDate,
     Notes: Text(Body.HtmlText)
     }
    );

    Mainly the .SelectedDate for the start/end date fields, and I needed to be a bit more specific than "body" for my Notes field. Thank you both for the help!  Also @DJ_Jamba Thank you for the previous message about checking the collection variable. I had no idea I could see this much detail of my collections! Very useful to know!

  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    Ok fabulous! Glad you got it working!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 413

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
timl Profile Picture

timl 315 Super User 2026 Season 1

Last 30 days Overall leaderboard