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?

2 Likes

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$

4 Likes

Thanks for that I’ll give it a try

2 Likes

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

2 Likes

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

2 Likes

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.

4 Likes

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

3 Likes

I hope you’re aware that the #WND# tag doesn’t work on WFF watches. Now that WFF is being rolled out more widely, including to older models, it’s important to keep this in mind when deciding to use tags that aren’t compatible.

3 Likes

Supposedly even formulas in text field are not working in WFF

2 Likes

Thank for the reminder - I was aware but i always try and do something new (for me) on each watch I make and this is just one of those. So, im not too worried about WFF for this one.
Thanks again

3 Likes

Facer text conditionals still work, but only in certain cases, as WFF no longer supports many of the older expression methods. simple formulas like $#Da#<12?AM:PM$ will still work in the WFF text field.

2 Likes