Add terniary operator in field value

I think that it would be very helpful to have the option to use a kind of terniary operator (? : ) in parameter value.

Actually, for condition like if this field is empty, set value … if not empty, set value, we need to create workflow conditions and repeat the same action to cover all possibilities. I think it would save a lot of time and maybe help performance if we can set a field like field = input’s value is empty ? “not filled” : “filled” instead of creating the workflow conditions for each.

For me, this is more related to API. When we create json payload, we often use something like

{"field":"<value>"}

But if value is empty, this is not set to null like it should.
So it would be helpful if we can use instead:

{"field":<value>}

And in the workflow, field will be set to input’s value empty ? null : “input’s value”

This is just an example, but I think that it give you an idea on how this can be usefull!

2 Likes

Just found today that it’s already possible (don’t know why I didn’t think about that before).

Basically, when you have a true or false, you can use :format as test. This will give you option to enter Yes or no value.
So an example would be to format the json like this
{“field”: current item field is empty:format as text}
And in the format as text you set yes to null
and no to “Current item field”

1 Like