cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Flows suddenly failing - Add hours function

Syntax:
formatDateTime(addHours(outputs('Compose'),-4),'MM/dd/yyyy HH:mm')
 
I'm using this function to subtract time from Microsoft Forms responses to match local time. My flow worked flawlessly up until 10 minutes ago when there have been several failures due to the error below. I believe the description is saying my syntax is incorrect.
 
Please help!
 
Error:
Flow Run Failure: One or more fields provided is of type 'Null'.
 
InvalidTemplate. Unable to process template language expressions in action 'Add_a_row_into_a_table' inputs at line '1' and column '16902': 'The template language function 'addHours' expects its first parameter to be a string that contains the time. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#addhours for usage details.'.
1 ACCEPTED SOLUTION

Accepted Solutions
Helper I
Helper I

Please ignore. It seems Microsoft was having issues because its now resolved itself with no changes.

 

View solution in original post

3 REPLIES 3
Helper I
Helper I

Please ignore. It seems Microsoft was having issues because its now resolved itself with no changes.

 

View solution in original post

Super User III
Super User III

Hi!

The problem seems to be... outputs('Compose') is null i.e. empty.

So you need to check which value is currently assigned to your 'Compose' action block.Assuming you assigned a Forms response to it, it means somebody did not answer the question, and you get a null value instead of a date modelled as a string in ISO 8601 format.

So, either you mark the question as mandatory, or you add extra logic to replace null and handle a default date instead.

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Yes, the issue was traced to the Microsoft Forms server.

All fields on the form are required (not optional). Downloading the Excel sheet with the response data, those entries are gone. There are 17 response IDs missing.

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 (65,501)