cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Microsoft Employee

ADDMINUTES Workflow function

I'm trying to create a flow that generates calendar entries for me to block for driving time when I travel to a meeting outside of my town.

I can easily create the calendar entry, but want it to be relative in time to my customer meeting.

The end time should be the same as the customer meeting start time.

The *start* time should be 30 minutes earlier:

 

@{addminutes(Start time×​​,-30)

 

That seems to fail, though, even though this looks like the right syntax to me:

 

@{addminutes(@{triggerBody()?['Start']},-30))}

 

What am I doing wrong?

 
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft Employee

Re: ADDMINUTES Workflow function

you can't have additional AT symbols nested inside an expression. What i find helpful is to use the dynamic content in the compose action, then get the error, then copy out the direct call to the item. Especially helpful when the displayed name of dynamic content doesn't match the actual parameter name.

 

"@addminutes(triggerBody()?['Start'],-30))"

 

Compose block needs ""s around the expression.

 

Another issue I've run into is the minus sign being recognised as a string. try int('-30') or sub(0,30)

1 REPLY 1
Highlighted
Microsoft Employee

Re: ADDMINUTES Workflow function

you can't have additional AT symbols nested inside an expression. What i find helpful is to use the dynamic content in the compose action, then get the error, then copy out the direct call to the item. Especially helpful when the displayed name of dynamic content doesn't match the actual parameter name.

 

"@addminutes(triggerBody()?['Start'],-30))"

 

Compose block needs ""s around the expression.

 

Another issue I've run into is the minus sign being recognised as a string. try int('-30') or sub(0,30)

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 387 members 4,748 guests
Please welcome our newest community members: