The order of conditinals matters

I have been putting multiple conditionals together in both opacity and text statements recently and being really puzzled by why some of them are not working. One thing seems apparent. If you have conditionals with multiple conditions with && or || they must come first.

For instance, this works:
$#Dm#>0&&#Dm#<11?0(#Dm#-1):$$#Dm#=0?59:$$#Dm#>10?(#DmZ#-1):$

This does not work for the second conditional:
$#Dm#=0?59:$$#Dm#>0&&#Dm#<11?0(#Dm#-1):$$#Dm#>10?(#DmZ#-1):$

With some of the opacity ones it was always zero even when the condition should have been met but all of the conditions were correct, they just had to be re-ordered to work properly.

1 Like

Sorry. I understand the $ ? : $ structure but this advanced stuff is beyond me. Glad you have a good handle on it.

1 Like

Purely trial and error. I don’t fully understand it but it does seem that conditionals with multiple boolean conditions should go first. Also You can only have 3 booleans per conditional to ensure it works. Some say 2 (maybe for support for older watches) but 3 seems to be the limit in the designer and on my watch. Most of the posts quoting 2 are so old I have to manually add the https to the link to get it to load.
$1=1||2=2||3=3?True:False$ works
$1=1||2=2||3=3||4=4?True:False$ Does not

To discover this I tested each conditional individualy and they all worked. Put together they didn’t so I played with the order and realisedit mattered.
Over a few cases it seemed to be if you had multiple conditionals and one of them had && or || it had to go first.

I have not tested multiple conditionals with more than one boolean in the mix.

The other annoying thing is that (#DmZ#-1) = 1 not 01. You can use a conditional: $#Tag#<10?0(#Tag#-1)$ but if you already have a heavy conditional list, or it would be a conditional within a conditional it will not work.

I am really hoping someone will tell me there is a much easier way I could have created this. The date name line could have been done in one had I not gone with the smaller font size on the left and right values.

1 Like

Amazing. A lot of work around the Month Number. :trophy:

Aye. That was a chore. Also a lot of searching around this forum on the leap year expressions.
(#Dy#%100)!=0&&(#Dy#%4)=0 seems enough since #Dy#%400 being a leap year exception won’t happen for ~380 years

1 Like

The official documentation says max 3: https://help.facer.io/hc/en-us/articles/360015279953-Boolean-logic

In general, combining conditionals like that work, but there have been problems reported on some watches, best is maybe to explore other ways first (you could split it into 2 layers and hide a layer with one condition for example)

Let me be that someone :stuck_out_tongue: (at least for the time, the date is probably more difficult, especially the previous day; the next day can be calculated with the current month’s max days tag).
I’ve made this a long time ago helping someone else on the forums:

It was requested as 12h back then, but can be adjusted to 24h easily.

4 Likes

Yes, your hour and minute expressions are neater. I used them with some minor alterations such as reducing #Dh#+1-1 to #Dh# I’m assuming it was a visual aid for you as you also had +2,3,4.

I also re-visited the dates and vastly reduced the layer. Of course I didn’t need a current date for each month group, just the one. I really don’t know what I was thinking there.
Remembering #DIM# I could also reduce the DayNum+1 to a single layer.
For-1 it is irrelevant whether it is a leap year for Feb so I could combine it into FebAprJunSepNov-1.
Quite a culling down to 7 layers from 21

1 Like

Another Master Class blooming here.

In that case I have another set of expressions I’d like checked for my usual overthinking if that’s OK.
It’s my first watch with sequences and is very much in its infancy. I definitely need a much better plasma ball sticker for the effect on the large ticks.

It’s the rotation and opacity of the plasma ball I may be overthinking.

Also, the position of the second hand seems to change each time I load it. I noticed that at 4 seconds it was pointing at 5 and so on so I made it (#DWFSS#-3) which rectified it. Next time I loaded it was a second behind so I reset it to #DWFSS#. On the next load it was a second ahead again.

1 Like

I sussed out the second hand thing. Depending on when you load the face #DWFSS# for 0 seconds can be anything between 0.0000000000000000 and 7.99999999999999999

It would be nice if it was actually the proper value, not the fraction of the second at which the face was loaded into the creator.

Posted this feature request: #DWFSS# is unreliable in creator

1 Like

:popcorn: :beer:

1 Like

Hi @rob.fisk
I don’t think the second hand is unreliable per se, but we are lacking a milliseconds field in the “time machine”. As for your request to look at the plasma watch face, I do have some suggestions (these work for me, and if you are happy with how you do it, by all means, keep doing that :wink: ):

  1. I would not use the build in fields when using custom images. Hands, tickmarks, stickers, etc are ok if you select one of the available ones, but as soon as you use your own image, you can’t see that image anywhere.


    ``
    I almost always use images and rename my layers accordingly:

  2. There is perhaps an easier way to rotate / show the plasma ball.
    I used (round(#DWFSS#/30)*30) for rotation and $(#DWFSS#%30)<=3||(#DWFSS#%30)>=27?100:0$ for visibility (i used opacity 50 in the example below, so you can see where it is at when “hidden”:

  1. While this might seem “cleaner” at first, consider revisiting it 3 months from now, and leaving that in will be a big help to understand what you were doing:

Hope this helps

3 Likes

I am liking the Idea of the Ghost Opacity for the Hidden . Brilliant : ) Shame we cannot Vote on any Topic. Who knows at the beginning it is going to turn out to be a Master Class . I am going to keep an Eye on you Two : )

1 Like

This is all fantastic advice. Thankyou. The rotation expression you provided is definately better.
I will stick with $((#DWFS#+6)%15)=0||(#DWFS#%15)=0?100:0$ for the visibility as that lights it up between 4 and 6 seconds, for example, rather than just on the 5.

Your image made me create my own star for clenliness and I will probably develop it further as it’s not quite plasma but still better than the previous mess.

1 Like

Having done much programming in more “normal” languages in a past life, it drove me crazy trying to find out why a conditional with 4 booleans kept returning a “blank” before finding out there’s a limit of 3. I needed to test for a particular condition at 23:59:59, and for some unexplainable reason I was hung up on individually testing #DH# and #Dm# and #Ds# as well as that condition, before the workaround finally dawned on me.

But I’ve definitely been able to use 3 booleans max on my old GW1 and (yay finally!) my new GW4.

1 Like

I see a lot of posts talking about the limit of elements (not the limit of operators) in a conditional formula. There’s a TON to read through to see what the answer is, which I have yet to see. So, I bit the bullet and ran my own test: I was able to use a conditional with 60 elements, spelling out the seconds from zero to fifty nine. It works in Creator as well as on both my GW1 and GW4 watches.

$#Ds#==1?one:$$#Ds#==2?two:$$#Ds#==3?three:$$#Ds#==4?four:$$#Ds#==5?five:$$#Ds#==6?six:$$#Ds#==7?seven:$$#Ds#==8?eight:$$#Ds#==9?nine:$$#Ds#==10?ten:$$#Ds#==11?eleven:$$#Ds#==12?twelve:$$#Ds#==13?thirteen:$$#Ds#==14?fourteen:$$#Ds#==15?fifteen:$$#Ds#==16?sixteen:$$#Ds#==17?seventeen:$$#Ds#==18?eighteen:$$#Ds#==19?nineteen:$$#Ds#==20?twenty:$$#Ds#==21?twenty one:$$#Ds#==22?twenty two:$$#Ds#==23?twenty three:$$#Ds#==24?twenty four:$$#Ds#==25?twenty five:$$#Ds#==26?twenty six:$$#Ds#==27?twenty seven:$$#Ds#==28?twenty eight:$$#Ds#==29?twenty nine:$$#Ds#==30?thirty:$$#Ds#==31?thirty one:$$#Ds#==32?thirty two:$$#Ds#==33?thirty three:$$#Ds#==34?thirty four:$$#Ds#==35?thirty five:$$#Ds#==36?thirty six:$$#Ds#==37?thirty seven:$$#Ds#==38?thirty eight:$$#Ds#==39?thirty nine:$$#Ds#==40?forty:$$#Ds#==41?forty one:$$#Ds#==42?forty two:$$#Ds#==43?forty three:$$#Ds#==44?forty four:$$#Ds#==45?forty five:$$#Ds#==46?forty six:$$#Ds#==47?forty seven:$$#Ds#==48?forty eight:$$#Ds#==49?forty nine:$$#Ds#==50?fifty:$$#Ds#==51?fifty one:$$#Ds#==52?fifty two:$$#Ds#==53?fifty three:$$#Ds#==54?fifty four:$$#Ds#==55?fifty five:$$#Ds#==56?fifty six:$$#Ds#==57?fifty seven:$$#Ds#==58?fifty eight:$$#Ds#==59?fifty nine:$$#Ds#==0?zero:$

And NO, I did not type all that out!! I used an existing list of numbers/words, plus my good friend MS Excel to generate this formula.

5 Likes