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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Create event in Outloo...
Power Apps
Answered

Create event in Outlook with fields

(0) ShareShare
ReportReport
Posted on by 29

Hello,

I would like to create a new event in Outlook with the data on the screen. Important are the date, the time, the calendar and the subject "photo appointment".

I used the code:
Office365.V2CalendarPostItem (Dropdown1.Selected.Name;Label1.Text;Date1Time.Text;Date1Time.Text)

But unfortunately, I don't have an event in the calendar. Unfortunately the time is missing too. Can somebody help me? That would be great.2019_04_26_08_57_48_Window.jpg

thanks a lot

many greetings

PPM

 

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

    @Newby_PPM 

    Your Date1Time label appears to only contain a time.  You will need a date and time to use for your start and end times.  And, they should be in UTC.

     

    Check your start and end time labels.  I believe that is where you are having issues.  In fact, my guess is that your formula is actually creating events, but it is using a default date...whatever that might be.

     

    I hope that gives you some clues.

  • Newby_PPM Profile Picture
    29 on at

    Hello,

     

    Hello,

    the code writes the event to the calendar (Outlook Cloud). But it doesn't write the time in the appointment.

    The time is in a text field. I tried to connect the field with a +.

     

    Office365.V2CalendarPostItem (Dropdown1.Selected.Name;Label1.Text;Datum1Termin.Text + Uhrzeit1.Text;Datum1Termin.Text + Label2.Text )
  • Newby_PPM Profile Picture
    29 on at

    Hello RansyHayes,

    thank you for your answer. the code writes the event to the calendar (Outlook Cloud). But it doesn't write the time in the appointment.

    The time is in a text field. I tried to connect the field with a +.

     

    Office365.V2CalendarPostItem (Dropdown1.Selected.Name;Label1.Text;Datum1Termin.Text + Uhrzeit1.Text;Datum1Termin.Text + Label2.Text )

     

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Newby_PPM 

    Have a go with the following formula:

    Office365.V2CalendarPostItem(Dropdown1.Selected.Name;
    Label1.Text;
    DateTimeValue(Datum1Termin.Text & Uhrzeit1.Text);
    DateTimeValue(Datum1Termin.Text & Label2.Text)
    )

    You may have issues with UTC depending on what is in the Text properties of the above controls and what their format would be.  You still may need to convert to UTC to get the times right.

     

  • Newby_PPM Profile Picture
    29 on at

    Hello,

    thanks for the tip that helps me further.

    Unfortunately I now get the error "Error with "Office365.Error with "Office365.V2CalenderPostItem": The method "V2CalenderPostItem" has an invalid value for the parameter "Start". "

    I added the UTC to the code. I tried it with different date formats, but always got the error again.

     

    Office365.V2CalendarPostItem(
     Dropdown1_1.Selected.Name;
     Subject.Text;
     DateTimeValue((Datum2Termin.Text & Uhrzeit2.Text);UTC);
     DateTimeValue((Datum2Termin.Text & Label3.Text);UTC)
    );;
    UpdateIf(
     TerminNR2;
     Uhrzeit = Dropdown4_7.Selected.Uhrzeit;
     {
     Mitarbeiter: Name.Text;
     Mail: eMail.Text;
     Telefon: Rufnr.Text
     }
    )
  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Newby_PPM 

     

    Give this formula a try instead:

    Office365.V2CalendarPostItem(
     Dropdown1_1.Selected.Name;
     Subject.Text;
     Text(DateTimeValue(Datum2Termin.Text & " " & Uhrzeit2.Text);UTC);
     Text(DateTimeValue(Datum2Termin.Text & " " & Label3.Text);UTC)
    );;
    UpdateIf(
     TerminNR2;
     Uhrzeit = Dropdown4_7.Selected.Uhrzeit;
     {
     Mitarbeiter: Name.Text;
     Mail: eMail.Text;
     Telefon: Rufnr.Text
     }
    )

    See if that works for you.

  • Newby_PPM Profile Picture
    29 on at

    Hello,

    I solved the problem. The date and time must be in a field and the formats of the data must be correct. Many thanks again

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard