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 / Patching data from for...
Power Apps
Unanswered

Patching data from form into sharepoint list and calendar of the user logged in power app

(0) ShareShare
ReportReport
Posted on by

Hi all,

 

I have a form: 

 

Screenshot 2021-11-10 at 1.32.25 PM.png

 

I want the data from this form to go into a sharepoint list which I have set up as name "Work Experience" and have connected the list to this app. I then want the dates and the data of this form to also go into the calendar of the person who is logged into this power app filling out the form. 

 

Here is my on select for the button: 

Patch('Work experience', Defaults('Work experience'),Form1.Updates);

If(
IsEmpty(Errors('Work experience')),
Office365Outlook.CalendarPostItem("Calendar", DataCardValue3.SelectedDate, DataCardValue2.SelectedDate, "Booking", DataCardValue1.Text, DataCardKey5.Text, DataCardValue6.Text, DataCardValue7.Text, DataCardValue8.Text
{Body:{contentBody:"", contentType:"text/plain"}})
)

 

Screenshot 2021-11-10 at 1.31.22 PM.pngScreenshot 2021-11-10 at 1.31.34 PM.png

 

Where am I going wrong/missing? Any ideas? 

 

Thanks in advance!

Categories:
I have the same question (0)
  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @AB21 

     

    I recommend using the V4 version of the connector

    Patch('Work experience', Defaults('Work experience'),Form1.Updates);
    If(
    IsEmpty(Errors('Work experience')),
    Office365Outlook.V4CalendarPostItem(
     "Calendar",
     "Booking",
     DateAdd(
     DateTimeValue(StartDate.SelectedDate & " 8:00:00 AM"),
     TimeZoneOffset(),
     Minutes
     ),
     DateAdd(
     DateTimeValue(EndDate.SelectedDate & " 8:30:00 AM"),
     TimeZoneOffset(),
     Minutes
     ),
     "(UTC) Coordinated Universal Time",
     {
    body: "Meeting Notes"
    }
    )
    );

     

    Here is the working sample which has Start Date, Hour, and Minute. This converts to UTC as well.

    Office365Outlook.V4CalendarPostItem(
     LookUp(
     Office365Outlook.CalendarGetTables().value,
     DisplayName = "Calendar"
     ).Name,
     SubjectInput.Text, Text(
     DateAdd(
     DateTimeValue(
     StartDatePicker.SelectedDate & " " & TimeValue(
     Concatenate(
     StartHour.Selected.Value,
     ":",
     StartMinute.Selected.Value
     )
     )
     ),
     TimeZoneOffset(),
     Minutes
     ),"dd/mm/yyyy hh:mm"),
     DateAdd(
     DateTimeValue(
     EndDatePicker.SelectedDate & " " & TimeValue(
     Concatenate(
     EndHour.Selected.Value,
     ":",
     EndMinute.Selected.Value
     )
     )
     ),
     TimeZoneOffset(),
     Minutes
     ),
     "(UTC) Coordinated Universal Time",
     {
     body: "Email Content",
     reminderMinutesBeforeStart: 30
     }
    )

     


    Thanks,
    Stalin - Learn To Illuminate

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @AB21 

     

    Please refer to the blog for some common issues when creating a Calendar invite.


    Thanks,
    Stalin - Learn To Illuminate

  • AB21 Profile Picture
    on at

    Hi @StalinPonnusamy 

     

    If I didn't want time to be in it just all day events how out I change your formula for this? 

    Also where in your formula would I add the data cards I have in my screenshot? 

    Screenshot 2021-11-10 at 2.45.58 PM.png

     

    Thanks in advance

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @AB21 

     

    Office365Outlook.V4CalendarPostItem(
     "Calendar",
     SubjectInput.Text, 
     StartDatePicker.SelectedDate,
     EndDatePicker.SelectedDate,
     "(UTC) Coordinated Universal Time",
     {
     body: "All day event Body </br>" 
     & "Employer Address : " & DataCardValue1.Text & "</br>"
     & "Another info",
     isAllDay:true
     }
    )
  • AB21 Profile Picture
    on at

    Hi @StalinPonnusamy 

     

    Where you have put Another info is that where I add each datacardvalue? 

     

    I am also getting errors with:

     

    Screenshot 2021-11-10 at 3.46.19 PM.png

     

    Please help!

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at
    • Yes, you can add your other Datacard values
    • Substitute your control names wherever applicable like start date, end date
    Patch('Work experience', Defaults('Work experience'),Form1.Updates);
    If(
    IsEmpty(Errors('Work experience')),
    Office365Outlook.V4CalendarPostItem(
     "Calendar",
     "Booking",
     DataCardValue3.SelectedDate,
     DataCardValue2.SelectedDate,
     "(UTC) Coordinated Universal Time",
     {
     body: "Meeting Note </br>" 
     & "Employer Address : " & DataCardValue1.Text & "</br>"
     & DataCardValue5.Text,
     isAllDay:true
    }
    )
    );

     

  • AB21 Profile Picture
    on at

    Hi @StalinPonnusamy 

     

    I have managed to add one more data card but any more I get errors: 

    Screenshot 2021-11-11 at 8.00.55 AM.png

     

    Also when I do try testing this app and clicking submit. Runtime fails and I get this error: 

    Screenshot 2021-11-11 at 8.05.45 AM.png

     

    Any ideas?

     

    Thanks in advance!

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @AB21 

     

    Comma misplaced. Body content should be like

    {
     body: "Meeting Note </br>" 
     & "Employer Address : " & DataCardValue1.Text & "</br>"
     & DataCardValue5.Text
    	& DataCardValue6.Text
    	& DataCardValue7.Text,
     isAllDay:true
    }

     

     

  • AB21 Profile Picture
    on at

    Hi @StalinPonnusamy 

     

    Thank you! So this goes into the sharepoint list but not into my calendar? 

    Runtime error is : 

    Screenshot 2021-11-11 at 8.05.45 AM.png

     

    Where am I going wrong? 

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Yes, a calendar invite will add to Outlook. Probably Start Date and End Date are the same when you send it since this is all day.

    Try this

    Office365Outlook.V4CalendarPostItem(
     "Calendar",
     SubjectInput.Text,
     DataCardValue3.SelectedDate,
     If(
     DataCardValue3.SelectedDate = DataCardValue2.SelectedDate,
     DateAdd(
     DataCardValue2.SelectedDate,
     1
     ),
     DataCardValue2.SelectedDate
     ),
     "(UTC) Coordinated Universal Time",
     {
     body: "All day event Body </br>" 
     & "Employer Address : " 
     & DataCardValue5.Text & "</br>" 
     & DataCardValue6.Text 
     & DataCardValue7.Text,
     isAllDay: true
     }
    )

     

    Note: Please change the control names to a proper name like StartDate, EndDate instead of DataCardValue1, 2. It's really hard to do coding.


    Thanks,
    Stalin - Learn To Illuminate

     

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard