FormatDatetime leads to Error when used in Attribute calculation

2
Im using the following expression for changing the value of an attribute: 'Opdracht ' + $refOrderElement/aa_OrdernummerB + '/' + $refOrderElement/ab_OrdernummerE + ' voor plaatsing in ' + $refMedium/b_Mediumcode + ' op ' +formatDateTime($refOrderElement/ac_Peildatum,'dd-MM-yyyy') + '.' The modeler sees this expression as valid. When deploying the application the XAS (2.4.6.1) generates the following error: Failed to evaluate expression, error occurred on line 3, character 10: com.mendix.modules.microflowengine.languages.microflowexpression.MicroflowExpressionException: com.mendix.modules.microflowengine.languages.microflowexpression.MicroflowExpressionException: java.lang.NullPointerException 'Opdracht ' + $refOrderElement/aa_OrdernummerB + '/' + $refOrderElement/ab_OrdernummerE + ' voor plaatsing in ' + $refMedium/b_Mediumcode + ' op ' + formatDateTime($refOrderElement/ac_Peildatum,'dd-MM-yyyy') + '.' ^ What should I use instead of formatDateTime?
asked
3 answers
1

does $refOrderElement/ac_Peildatum have a valid value that you can actually parse? (ie: is $refOrderElement/ac_Peildatum null?)

What happens when you call formatDateTime($refOrderElement/ac_Peildatum) instead of formatDateTime($refOrderElement/ac_Peildatum, 'dd-MM-yyyy')?

answered
0

Yes it has a valid value.

answered
0

Any update on this? We have similar problem with version 4.7.1. The modeler doesn't complain, but the error occurs at runtime. Null values don't seem to be the issue.

answered