Closed startsevsa closed 3 years ago
We want to avoid over-complicating label expressions as they can slow things down when rendering. I think this is out of scope. Currently we use regex to parse the label expression, but parsing conditional expressions is not trivial. To be clear - I am not going to implement this.
I'm going to close this one because it just ain't gonna happen.
This will be a got addition to label expression language to have an ability for using IF and CASE analogs (like in Excel & etc).
Example of using: you have a property, which can bet set or not (is optional) And when using an element with this option in a view, you want to show in in brackets, but when the value of property is empty, you want to hide the empty value itself and the brackets too.
With conditional formula this can be done, for example smth. like this:
${if(${property:optional property}='';'';'('+${property:optional property}+')')}