Ternary operator do nothing in else

I am using a ?: style if-then-else and I don’t want to do anything for the else, so like this:

dmx-on:click="some_var.value=='some_value'?do_something:do_nothing"

What syntax do I need to put to create the do_nothing part?

Where are you using this expression exactly?

On click, execute a server connect only if a condition is true…

So in the dynamic events of App Connect, is that right?

Yes, have edited the code above to show that!

Would just putting null work?

Then it would be:

dmx-on:click="some_var.value == 'abc' ? serverconnect1.load() : false"

And please when asking questions make sure to explain what exactly are you doing. This saves us time asking different questions every time you ask a question.

1 Like