cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ewoud
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
v-bacao-msft
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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (20,548)