cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nobel8
Regular Visitor

undefined

Hello

 

I am struggling with the following issue.

 

I have a flow that I have built to update all the items in a sharepoint list each night at a scheduled time.
The flow will run but errors when it encounters an Excel column with a blank instead of the date.

 

 

The error it provides is:

 

"Unable to process template language expressions for action 'Workflow_Completed' at line '1' and column '23558': 'In function 'converttimezone', the value provided for date time string '' was not valid. The datetime string must match ISO 8601 format.'."

 

Nobel8_0-1637786214581.png

Nobel8_1-1637786230284.png

Nobel8_2-1637786257941.png

 

 

I tried to use the following expression for workflow completed to ignore blanks, where workflow_completed in red points to the dynamic content in the convert time zone action:

 

if(empty(items('Apply_to_each_3')?['Workflow Completed']),null,body('Workflow_Completed'))

 

but I still get the same error.

 

Thank you advance for you help, and please let me know if any additional info is needed.

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
tom_riha
Super User
Super User

Hello @Nobel8 ,

the Convert Time Zone action can't have an empty input, therefore, if you use the condition and the input is null, the action won't like it - hence the error message.

I'd use the ConvertTimeZone expression instead of the action:

convertTimeZone(date, 'sourceTimeZone', 'destinationTimeZone', 'format')

I'd put it in the if(...) expression directly in the 'Create item' action. If the date is null, update null, otherwise convertTimeZone and store the date, it would go like:

if(empty(items('Apply_to_each_3')?['Workflow Completed']),null,convertTimeZone(items('Apply_to_each_3')?['Workflow Completed'],'Eastern Standard Time','Samoa Standard Time','d'))

The list of all available time zones is here: https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms912391(v=winembedded.11)



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

2 REPLIES 2
tom_riha
Super User
Super User

Hello @Nobel8 ,

the Convert Time Zone action can't have an empty input, therefore, if you use the condition and the input is null, the action won't like it - hence the error message.

I'd use the ConvertTimeZone expression instead of the action:

convertTimeZone(date, 'sourceTimeZone', 'destinationTimeZone', 'format')

I'd put it in the if(...) expression directly in the 'Create item' action. If the date is null, update null, otherwise convertTimeZone and store the date, it would go like:

if(empty(items('Apply_to_each_3')?['Workflow Completed']),null,convertTimeZone(items('Apply_to_each_3')?['Workflow Completed'],'Eastern Standard Time','Samoa Standard Time','d'))

The list of all available time zones is here: https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms912391(v=winembedded.11)



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Thank you @tom_riha this worked.  Only item that was not functional was the link to current time zones as that gave me a 404

The list of all available time zones is here: https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms912391(v=winembedded.11)

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,340)