cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Ewoud
Level: Powered On

Add condtion to Convert time zone

Hi there,

 

We use Jotform for an online form which has an integration with Flow. The form contains a couple of date fields. Those dates need to be converted when entered. The conversion isn't the problem, that works fine. Problem is that the date fields do not always need to contain data and therefore can be empty when a form has been filled in. I need the flow to skip the conversion when no data has been filled in otherwise the flow will fail because there is no date to be converted. 

 

It probably needs to be done by using a condition but I have no idea to configure the condition in this situation. 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Add condtion to Convert time zone

Hi @Ewoud ,

 

This is irrelevant to the logic set by Condition. The following action is executed only when the Date field is not empty.

The problem here is that the format of Date field does not seem to work in Convert Time Zone action. The datetime string must match ISO 8601 format.

Please use Compose to output the value of Date field to see its specific format.

15.PNG16.PNG

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.

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Add condtion to Convert time zone

Hi @Ewoud ,

 

If you want to determine whether the field of a date type is empty, please refer to the configuration below to set the right side of Condition to blank.

Image reference:34.PNG

Hope it 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.
Ewoud
Level: Powered On

Re: Add condtion to Convert time zone

Hi @v-bacao-msft,

Thanks for your reply. Unfortunately the Flow fails when I leave the value empty. I have also tried:

Null
Empty(item()?['25 - Datum huwelijk'])
Empty(triggerBody()?['25 - Datum huwelijk'])

But all give the same error when executing the Flow:

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

How the setting looks like now with the If No option in code view:

datehuwerlijk.jpg

Community Support Team
Community Support Team

Re: Add condtion to Convert time zone

Hi @Ewoud ,

 

This is irrelevant to the logic set by Condition. The following action is executed only when the Date field is not empty.

The problem here is that the format of Date field does not seem to work in Convert Time Zone action. The datetime string must match ISO 8601 format.

Please use Compose to output the value of Date field to see its specific format.

15.PNG16.PNG

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.

View solution in original post

Ewoud
Level: Powered On

Re: Add condtion to Convert time zone

Hi @v-bacao-msft,

Sorry for the delay. I wasn't able to test your suggestion untill today.

I have made the change and was able to succesfully execute the flow. So it works perfectly now.

Thank you for your help!

Regards,

Ewoud

Helpful resources

Announcements
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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (3,965)