Feature request: multiple/netsed conditionals

Hi,

It’s currently impossible to use multiple conditions in one field.
Neither multiple conditions side-by-side or nested.

Examples:

$#Db#==24?00:($#Db#<10?0#Db#:#Db#$)$


$#Db#<10?0:$#Db#:#Dm# $#DH#>=13?P:A$

Can this be added?

Thx,
Svensei38

@Svensei38,
Only Nested IFs work and ONLY if the operator is EQUALS.

So this works…

$#DOW#=0?A:$$#DOW#=1?B:$$#DOW#=1?C:… and so on
If it’s Sunday do A, else if it’s Monday do B, else if it’s Tuesday do C… and so on.

I’ve used up to twelve nests (months of the year).

John

1 Like

Aha! Good to know.
I was using larger or equal than (>=) in my watch face, which did not work so I assumed multiple conditions didn’t work at all.

@jmorga106 Thx John for setting the record straight.

I’m getting inconsistent results.

If (x=0) action 1 IfElse (x<3) action 2 IfElse (x=3) action 3 etc…’ works Ok.

$x=0?(action 1):$$x<3?(action 2):$$x=3?(action 3):$

But ‘If (x=0) action 1 IfElse (x<3) action 2 Else action 3’ does not!? The last logic branch ‘action 3’ is never reached.

$x=0?(action 1):$$x<3?(action 2):(action 3):$

No idea what the criteria is for this to work correctly.

@andrew.dowden,
Yes you are EXACTLY correct. Please go back to my post - only the EQUALS condition carries thru in this multi-nest.

If (x=0) action 1 IfElse (x<3) action 2 IfElse (x=3) action 3 etc…

here’s one of the gotcha’s: In my experiences that x<3 condition looks like it works in the Creator but will not work on my watch. Here’s the most frustrating part: I had a multi-nest conditional on one of my watches that looked like it was completely working in the Creator and I published it (and it was for sale). 5 days later I happened to glance at my watch exactly when one of the greater than (>) sections was active and I noticed a whole section of my face design was missing (D’oh!)

I had to pull the design down and redo the whole thing. As to the back end of the formula, the app will conduct the math up to the failure and just truncate the rest of the formula. Most formula math in application development is wholistic. For example in Excel a formula is checked through and though as soon as you hit the enter key. The syntax is either all good or all bad and errors out immediately. But “Facer math” executes from left to right. A formula will keep working up to the fail point and just drop the rest of the formula.

I suspect that the math formulas in the Facer designs may be parsed for piece-by-piece execution by an interpreter program (I’m a software engineer) in real time from left to right. Think of a DO - LOOP reading in your formula string executing the math section-by-section and from left to right until something is not right. Then the program exits the loop and just ignores the rest of your formula. - that’s my guess.

So yeah… EQUALS only.

-john

I’ve been a software engineer too long … (since I was a 10 or 11, as I was coding at 7).

I’m already building workarounds on my workarounds. What they have is NOT something I could recommend to anyone … unless they like frustrating puzzles.

I already have a draft ‘complete re-design’, leveraging off some R&D work I did around 7 years ago …

cool. I’m guessing the math interpretation code’s priority is “smallest memory footprint possible” instead of robust features. C’est la vie, I’ve been living with it - you get used to the syntax. The puzzle comment you mentioned can be very rewarding when you get something weird to work.

-john

I still respect what they intended … let artisans design watches, and don’t make them have to write and compile code … But, they tacked too many things on top of a “shoddy” base design. It would make it quite unwieldy to add the missing pieces.

It still only has the complete tools for ‘artistic’ watches that look cute and look like they work properly … But, not tools to allow that to be realised.

Later …

1 Like

Would it be easier to support some kind of scripting language with proper loops, conditional statements, variables? Not something complicated but a version of BASIC from the 80s :slight_smile:

I am with you, @andrew.dowden

I am used to user friendly workarounds all the time when i worked with graphics programs and/or interactive media creation software.

ImhO Facer should create one as well to be competitive to other programs - but it‘s their decision.

The „puzzles“ are sometimes very complicated and mean a lot of trial-and-error and debugging.

Maybe they develop something more userfriendly in future but since then we have to use what is…

Complaining doesn‘t help that much…

I think the whole staff are more programmer than artistics and don‘t know much about the needs of users.

I’ve been getting fairly used to this working area now but i am not very happy with it and i think others aren‘t, too.

Let‘s hope there will be some evolution in future…

They (Facer) should at minimum:

  • Add containers, with an initial origin (x, y), for re-used design elements

  • Rationalise the tags/functions, to some system of naming; and drop (or separate) all the display-only variants. This includes fixing/adding the inverse-trig functions (asin(), acos(), atan(), and atan2(,)), and other missing primitives: UTC day, month, year; UTC offset hours, minutes; etc.

  • Add ‘Regex’ syntax, for content filtering / display

  • Add user variables (re-use of outcome), from formulae-only fields

  • Add reserved variables for: Northern/Southern Hemisphere (or Equatorial); AM/PM vs. 24Hr, AM (displayed, if NOT 24hr), displayed: Second-digits, Second-hand; tick/smooth: Second-, Minute-, Hour-hand, etc.; Home locale (name/city, timezone, long./lat., lang./dialect), C//F preference, Daylight/Summertime, etc. With these defined in the users profile, and editable on the watch if required (including changing city/locate).

Subject to: errors, amendments, other’s opinion, …

1 Like