else part of if-statement must cover the case when the variable is empty without explicitly defining it - Mendix Forum

else part of if-statement must cover the case when the variable is empty without explicitly defining it

1

Hello Dear Mendix Community,

 

In order to make dynamic class of a dataGrid2 function one has to specify the variable to not be empty in an if-condition (Mendix Community - Question Details).

My idea is to make it being automatically covered within an 'else' case.

 

Explanatory example:

IS-State:

if value=100 then 'class1'

else 'class2'

(value empty -> neither class is being selected)

 

MUST-State:

if value=100 then 'class1'

else 'class2'

(value empty -> 'class2' is being selected)

 

It's being done like so in many popular programming languages like for example in python and javaScript.

 

It would be of course also very helpful to be able to debug expressions (to put breakpoint inside of expressions to be able to evaluate those expressions).

 

Please consider implementing such behaviour into mendix-expressions.

asked
0 answers