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

Calendar Dynamic Values & Functions -- Editing Time Format

Hello -

 

I built a flow that runs in the early morning and sends an email for every event on my Outlook calendar. This replicates something similar I used when working at a Google Apps shop. It helps me to plan out my day by building alerts into my routine of killing off email each morning.

 

The Outlook connector includes Dynamic values like Start Time and End Time, but those values are stored in UTC format. There are Expressions like AddHours that I could use to theoretically subtract 5 hours (I'm ET), but it won't allow me to use them together.

 

When I select the AddHours Expression, the first parameter if a timestamp. I cannot insert the dynamic values Start Time or End Time as that parameter.

 

There may be a better or more straightfoward way to do this... Maybe there's a connector or expression I could use that would just reformat my Start Time and End Time to the timezone I want. If so, let me know.

 

If not, here are my errors. I appreciate any help.

 

Here's my flow:

https://netcenters-my.sharepoint.com/:i:/g/personal/andrew_sather_net-centers_org/EcjXe2zYX_ZNo-Zeoy...

 

Here's the error:

https://netcenters-my.sharepoint.com/:i:/g/personal/andrew_sather_net-centers_org/Ec_lXwyvgUZLuCNTkK...

 

Here's what happens when I try to find Start Time in the Dynamic Content tab after using addHours()

https://netcenters-my.sharepoint.com/:i:/g/personal/andrew_sather_net-centers_org/ERRuF2LwN-RFl4ikh6...

 

...It's not listed as an option.

 

Am I misunderstanding how Dynamic Content and Expressions can be used together?

 

 

 

 

7 REPLIES 7
Super User
Super User

Re: Calendar Dynamic Values & Functions -- Editing Time Format

Hi @asather

 

It is possible to use multiple nested functions in a single expression so you should in theory be able to combine AddHours with another function.

However, in your scenario you may be better off using the ConvertFromUTC function. This takes a date time value in UTC along with the name for the timezone you want to convert to.

ConvertFromUTC

Timezone Id reference


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

asather
Level: Powered On

Re: Calendar Dynamic Values & Functions -- Editing Time Format

I still have the same core problem with convertFromUTC().

 

When I select it as an Expression, the Start Time and End Time Dynamic Values are not available to select. When I just type the Start Time field, it doesn't work. Or am I using the expression incorrectly?

 

Here's a screenshot:

https://netcenters-my.sharepoint.com/:i:/g/personal/andrew_sather_net-centers_org/EU1U_nMk7BZIn5e8vr...

Super User
Super User

Re: Calendar Dynamic Values & Functions -- Editing Time Format

Hi @asather

 

If you start typing the expression and then click back to Dynamic Content tab you should be able to select it and insert it into the expression (see the below gif).

 

2019-01-30_16-41-20.gif


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

asather
Level: Powered On

Re: Calendar Dynamic Values & Functions -- Editing Time Format

Hello -

 

That's what I'm doing, but [Start Date] and [End Date] aren't options for me, like [Trigger date] is for you.

 

See screenshot:

https://netcenters-my.sharepoint.com/:i:/g/personal/andrew_sather_net-centers_org/EfRHnhGNqiRCgTGdW5...

 

Super User
Super User

Re: Calendar Dynamic Values & Functions -- Editing Time Format

Hi @asather

I have just tested this with the Get Calendar Events action and am seeing the same as you, many of the fields are not available in the expression.

You may be able to work around this using variables set up like the below. You will need to initialize any variables outside of the loop and then inside the loop set them to the Dynamic Content. You can then access the variables when building the expression.

 

chrome_2019-01-31_13-24-44.png


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

asather
Level: Powered On

Re: Calendar Dynamic Values & Functions -- Editing Time Format

In case anyone sees this in the future, the above does not work, sadly. You get an error. Thanks, anyway, all!

2019-02-14 16_49_14-Window.png

Super User
Super User

Re: Calendar Dynamic Values & Functions -- Editing Time Format

Hi @asather

 

You need to make sure you have an initialize variable action along with a set variable action (refer to the image in my previous post). In your screenshot you are attempting to use a variable called "Start Time" that doesn't exist as it hasn't been initialized.


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users online (4,948)