cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

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
Solution Sage
Solution Sage

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

@LeeHarris 

 

 

23-01-_2020_12-58-21.png

 

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

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

 

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

Community Support
Community Support

 

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
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (49,958)