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?
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.