Conditional text

I have a conditional $#WND#==0?0-0.2:0$ inthe text field - I’ve tried “0-0.2” and parentheses around the tag and around the text to no avail. The conditional always treats 0-0.2 as a calculation is there any way to make it text?

1 Like

Yes, but I don’t think you can do that on one line.

Use 2 elements, something like:

  1. element 1:
    txt: #WND#
    opacity: $#WND#>0.2?100:0$

  2. Element 2:
    txt: 0-0.2
    opacity: $#WND#==0?100:0$

3 Likes

Thanks for that I’ll give it a try

1 Like

Why do you not split it? like 0$#WND#==0?-0.2:$
You have there 0 in both cases, or I do miss something.

1 Like

The result needs to be text eg “0 - 0.2” it’s a range in text meaning if #WND# = 0 then the result should show 0-0.2

1 Like

I mean your condition $#WND#==0?-0.2:0$ should return either 0-0.2 or 0 if it worked as you intended. So the result starts with a 0 in both cases and you can simply take the 0 out of both results and put it before the expression, so there wont be any “calculation” in any of the results.

2 Likes

AHA…i think that may do the trick - thanks all :smiley:

1 Like