Can we write an only IF condition in mendix ?

0
Can we write an only IF condition in mendix ?   Like in any other programming language, for example   if(a = 2) { console.log(true) }
asked
4 answers
0

Hi Subhojit,

Its not possible in Mendix to write if without else.

' If then else ' is necessary.

 

Hope it helps!

answered
2

Hi, 

We can not use the if condition without the else part. You can use '' in the else part to avoid it. Pls, refer to the image.

 

answered
1

Hi,

If this condition is to be used in a microflow or nanoflow, this can be modeled out with a descission.
This descission will need a true and a false output.
In the true flow, you can put a log,

In the false flow you can just merge back in your main microflow line, so the log will not be written.

 

Hope this helps

answered
0

Hi Subhojit Paul

yes, we can able to write the If Condition in Mendix in different ways

1. Xpath expressions
2. Change Object activity
3. Decision split type 

For example ,



In change object, we can add values based on If condition or 

Eg : if 7 > 6 then 'correct' else 'incorrect'

we can check the data in variables but we can't able to get details in the console whether the If condition passed or failed 

 

answered