Why is this tag expression not working anymore?

Since the translations of the different languages are not always accurate, I built a watch face for my German Pixel Watch. I display the days of the week in a text field as follows:

(([DAY_WEEK]) == 1? “SO”:([DAY_WEEK]) == 2? “MO”:([DAY_WEEK]) == 3? “DI”:([DAY_WEEK]) == 4? “MI”:([DAY_WEEK]) == 5? “DO”:([DAY_WEEK]) == 6? “FR”:([DAY_WEEK]) == 7? “SA”:“”)

Everything still looks normal in WFS, but after I run the watch face on my Pixel Watch, only the word “False” is displayed.

Has anything changed with the tag expressions in version 1.7.9?

1 Like

Does the count not go from 0 to 6 .
I would try separate conditionals rather than try make them one .

(([DAY_WEEK]) == 1? “SO”:"")(([DAY_WEEK]) == 2? “MO”:"")

and so on

Obviously on the same text layer .
I am sorry I can not test this at the moment .

1 Like

Of course there are other ways to solve this but as far as I remember this worked with v 1.6.9

1 Like

Yes . Sometimes as things move on the Syntax rules get changed a bit.

I have checked your formulas and this on my GW5Pro .
Works fine in 1.7.9 but false on watch .
Forgive me . I am no expert . I am a Copy and Paste , Trial and Error Person .

([DAY_WEEK]==3?"TU":"")([DAY_WEEK]==4?"WE":"")([DAY_WEEK]==5?"TH":"")([DAY_WEEK]==6?"FR":"")([DAY_WEEK]==7?"SA":"")([DAY_WEEK]==1?"SU":"")([DAY_WEEK]==2?"MO":"")

So by trial and error I found this works .
.

(([DAY_WEEK]==3)?"TU":"")

Ok Now it does not .

So this is quite Beyond me . So sorry .

Thanks for your feedback and effort. Does anyone else have a solution to this?

1 Like

I wonder if someone using 1.6.10 could test it . I know @Boshra gives fine Responses .

1 Like

Try this sort of thing:

(([DAY_WEEK]==1)?"SO":([DAY_WEEK]==2)?"MO":"SA")

Be careful not to allow quotes to get converted into ‘smart quotes’ (which aren’t).

I haven’t tested this on a real device.

2 Likes

Just tested the build of this in Android Emulator. It seems to work there too.

1 Like

Thanks for referring me. But seems this is a bug. I have tried with different changes but no hope.

2 Likes

Please create a support ticket.

2 Likes

Your formula works on my GW5 Pro watch . Wish I knew more than I do about Smart Quotes .

Thanks for checking! :+1:

1 Like

Thanks for your Formula . I have to work my formulas from the School of Dumb . it is good to see advanced stuff . Well from my point of view . I will put your Formula in my Bits Box .

:+1: I have a ‘Bits Box’ for snippets too. :slightly_smiling_face:

1 Like

I wonder if you have a name for that kind of formula ? I would say something like Nested Conditional . Thanks again . We we are all riding on the shoulders of Giants . I wonder Who is your Mentor .

‘Nested Conditional’ works fine. ‘Nested ternary’ is more specific in this case: see here.

The use of parentheses is a bit complicated in WFF/WFS, since they’re used to control the order of operations and ALSO to force results to be treated as numbers (as opposed to strings).

1 Like

Thank you . I understand your Formula well but I do not understand the outline in the Documentation . I was always told not to bother with maths because I was to stupid . Sometime a Topic turns into a Master Class Tutorial . This one is Bookmarked for me .

I tried this syntax and again in worked in WFS but not on my PW3. I have opened a ticket, thanks

1 Like

Yeah . PW3 is running the new OS . It is not Fair . Did you Raise a Support Ticket .
Ha Ha . Read the above .

1 Like