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

powerapps create event with users correct time zone

Hi 

I am trying to create an app in which the user can create calendar event by clicking a button to add to calendar. I am using a date picker with drop downs for hour and minutes. I have the function working when I set timezone to one time zone eg {TimeZone:"(UTC+08:00) Perth"} but I have had no luck trying to set to UTCNow() or (UTC) Universal coordinated Time. 

I have tried this function by using Flow without success.  I am now trying Powerapps alone without any success. Any support would be greatly appreciated. 

 

Here is the formula I am using which works for a single time zone:

 

Office365.V2CalendarPostItem("Calendar","Test Subject",Agree_FollowDate.SelectedDate+Time(Value(D_2hrs_2.Selected.Value), Value(D_2mins_2.Selected.Value),0,0),Agree_FollowDate.SelectedDate+Time(Value(D_4hrs_2.Selected.Value), Value(D_4mins_2.Selected.Value),0),{TimeZone:"(UTC+08:00) Perth"})

 

4 REPLIES 4
Community Support Team
Community Support Team

Re: powerapps create event with users correct time zone

Hi @Buffet_Sphere,

Could you please share a bit more about the error message within your app?

 

I have made a test, and the issue is confirmed on my side. The screenshot as below:1.JPG

The error would show up as below:

 

The value of '(UTC) Coordinated Universal Time' of parameter of EndTimeZone is invalid

When you set a time zone value for the TimeZone property within the Office365.V2CalendarPostItem function, actually it would set this value to StartTimeZone property and EndTimeZone property, I afraid that we could not set a (UTC) Coordinated Universal Time value for the EndTimeZone property currently.

 

As an alternative solution, I think the Office365.CalendarPostItem function could achieve your needs. I have made a test on my side, please take a try with the following workaround:3.JPG

 

2.JPG

Set the OnSelect property of the "Create Event2" button to following formula:

Office365.CalendarPostItem(
Dropdown1.Selected.Name,
DatePicker2.SelectedDate+Time(Value(Dropdown4.Selected.Value),Value(Dropdown5.Selected.Value),0),
DatePicker1.SelectedDate+Time(Value(Dropdown2.Selected.Value),Value(Dropdown3.Selected.Value),0),
TextInput1.Text,
{
StartTimeZone:"UTC",
EndTimeZone:"UTC"
}
)

On your side, you should type the following:

Office365.CalendarPostItem(
"Calendar",
Agree_FollowDate.SelectedDate+Time(Value(D_4hrs_2.Selected.Value), Value(D_4mins_2.Selected.Value),0),
Agree_FollowDate.SelectedDate+Time(Value(D_2hrs_2.Selected.Value), Value(D_2mins_2.Selected.Value),0),
"Test Subject",
{
StartTimeZone:"UTC",
EndTimeZone:"UTC"
}
)

 

 

More details about the Office365.CalendarPostItem function, please check the following article:

https://docs.microsoft.com/en-us/connectors/office365/#create-event--v1-

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Buffet_Sphere
Level: Powered On

Re: powerapps create event with users correct time zone

Hi Kris

Thanks for your support. This seems to have worked. Initially it didn't, but there seemed to be an issue with the datepicker. I replaced the datepicker button with  a new one and it seems to work perfecty for my time zone. I just need to wait for my interstate colleagues to test it to confirm that it works on their end but I am not anticipating any issues!

 

Thanks heaps!!!

 

Buffet_Sphere
Level: Powered On

Re: powerapps create event with users correct time zone

Office365.CalendarPostItem(
"Calendar",
Agree_FollowDate.SelectedDate+Time(Value(D_4hrs_2.Selected.Value), Value(D_4mins_2.Selected.Value),0),
Agree_FollowDate.SelectedDate+Time(Value(D_2hrs_2.Selected.Value), Value(D_2mins_2.Selected.Value),0),
"Test subject",
{
StartTimeZone:"UTC",
EndTimeZone:"UTC"
}
)

 

Any idea how I can attend an Attendees email address into this equation. I had set up requiredAttendees and used a dropdown time zone selector as a interim solution while I worked out the UTC issue, but I cannot seem to add required  attendees into this equation and am struggling with an expression for {Attendees:  

 

I am using a input field where the attendees email address will be written. 

 

Thank you for your assistance so far, any further help would be appreciated. 

Christoph_G
Level: Powered On

Re: powerapps create event with users correct time zone

Hello @v-xida-msft ,

I am still running into this issue that I cannot hand over a TimeZone-Value in V2CalendarPostItem.

There is one Parameter called "TimeZone" and upon Posting the request I get an error back that "The value "Coordinated Universal Time" for parameter EndTimeZone is invalid"

This is especially funny, since there is (compared to V1CalendarPostItem for that matter) no StartTimeZone and EndTimeZone.
Meaning: I cannot even use EndTimeZone as a parameter because it's not there in the connector-definition of V2, but the outlook still wants it.

Sure, I could also use V1 for the moment, but in DOCS it already says that V1 is deprecated and that kinda makes me think, whether this is a good/sustainable idea at this moment in time.

Can we expect a fix for that soon?

A connector should be able to work with the parameters that are defined to be handed over! Shouldn't even be a question.

Kind regards

Christoph 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 42 members 4,095 guests
Please welcome our newest community members: