Ternary's in database actions create invalid inputs

Wappler Version : 4.0.3
Operating System : mac intel 11
Server Model: node
Database Type: maria
Hosting Type: docker

Expected behavior

When using ternary expressions in a database action, no input should be added to the inputs list

Actual behavior

The expression is added an an input

How to reproduce

Create a database insert or update and include a ternary within the value:

Which will generate an invalid input:

Screen Shot 2021-09-06 at 5.47.12 PM

1 Like

I noticed that the other day too, it gets worse if you create a Database Multi Update, and rename the repeat from record to repeat_products and then go add some ternary expressions inside.
I got quite a fright, but just deleted all it added and it still worked, lol.

This should not happen indeed, but in cases like this it’s better to use the default formatter. That’s what it’s meant to be used for:

{{$_POST.var_name.default('some value')}}
1 Like

Yes, bad example.

This has been improved in Wappler 4.0.4

This topic was automatically closed after 44 hours. New replies are no longer allowed.