cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Add X Days to "Date" Workflow

Hello Microsoft Community
Unfortunately I have the following problem, and I can't solve it at the moment because I always get error messages:

InvalidTemplate. Unable to process template language expressions in action 'Delay_until_2' inputs at line '1' and column '2789': 'The template language function 'addDays' expects a timestamp as the first parameter, the number of days to add as the second parameter, and an optional format string as the third parameter. The function was invoked with '1' parameter(s). 
 
My request is actually quite simple, but my "expressions" do not work.
 
So the planned process (workflow):
 
When an item is created in SharePoint List,
it should wait until the specified date is reached from the SharePoint list.
This means the SharePoint list field "ExpirationDate" 25.01.2020 12:00 o'clock".
 - 2 Days " So I would like a reminder on 23.01.2020 12:00.
 
I would appreciate any message
 
Thanks a lot
 
Luca
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Add X Days to "Date" Workflow

Hi @luca4342 

You should have a single expression within your Timestamp property which would look something like the below. You also do not need to include the = symbol.

addDays(Abgabe-Frist, -2) 

 

Replace the text "Abgabe-Frist" with the Dynamic Content for that property. This can be done while creating the expression by clicking the Dynamic Content tab as shown in example below (where I am making use of Dynamic Content in an addHours expression).

 

2020-01-21_11-59-41.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

View solution in original post

6 REPLIES 6
Highlighted
Super User
Super User

Re: Add X Days to "Date" Workflow

Hi @luca4342 

Please can you share the expression that you are using at the moment that is giving you the error?

 


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

Highlighted
New Member

Re: Add X Days to "Date" Workflow

@LeeHarris 

 

 

23-01-_2020_12-58-21.png

 
Highlighted
Super User
Super User

Re: Add X Days to "Date" Workflow

Hi @luca4342 

You should have a single expression within your Timestamp property which would look something like the below. You also do not need to include the = symbol.

addDays(Abgabe-Frist, -2) 

 

Replace the text "Abgabe-Frist" with the Dynamic Content for that property. This can be done while creating the expression by clicking the Dynamic Content tab as shown in example below (where I am making use of Dynamic Content in an addHours expression).

 

2020-01-21_11-59-41.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

View solution in original post

Highlighted
New Member

Re: Add X Days to "Date" Workflow

Hi @LeeHarris 

 

Thanks a lot for your fast Reply,

unfortunately if i fill the Field with "

addDays(AbgabeFrist_x002b_Uhrzeit,-2)" &

try to Click on OK it will not insert in the field.

 

23-01-_2020_13-28-43.png

 

Highlighted
Super User
Super User

Re: Add X Days to "Date" Workflow

Hi @luca4342 

The name of the Dynamic Content doesn't appear correct in the expression you have at the moment. Did you type the content of the addDays expression or select it from the Dynamic Content tab as shown in my previous post?

 


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

Highlighted
Community Support
Community Support

Re: Add X Days to "Date" Workflow

 

Hi @luca4342 ,

 

You could consider directly using the Add to time action, configure the Date field output by the trigger in Base time, and then use the formatDateTime() function to format the time output by Add to time into the required format and configure it in the Delay until action.

Expression reference:

formatDateTime(body('Add_to_time'),'yyyy-MM-ddTHH:mm:ssZ')

Image reference:

68.PNG

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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!

Top Solution Authors
Top Kudoed Authors
Users online (4,644)