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

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

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
Community Support

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.

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

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

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
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

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!

Top Solution Authors
Users online (9,726)