There is no Km/Mile in the conditional line. Is there a way to convert Km and Mile?
Since you canât access Samsung Health directly there is no distance feature so no Mile/Kilometer options.
There is a topic in this community where other members have posted calculations to use step count to create distance for Mile or KM but you would need to use a tap action to change so one appears and the other one doesnât. There are no Tags.
Ron
Samsung Developer Relations
Thank you for your answer.
To change one to display and the other to not display, how exactly should I set the tap action?
I used the [LANG_LOC] tag to decide whether to display miles or km. Basically if the [LANG_LOC] reflects US or UK, I set it to miles, otherwise itâs km. Itâs probably not perfect, but it provides a level of automation.
The tag expression I use in the opacity field for miles is:
100*(([LANG_LOC]==âen_GBâ)+([LANG_LOC]==âen_USâ))
The km condition is just the inverse.
Hope this helps,
Rob
Looks like LANG_LOC is not available in Opacity tags.
Youâre right, it doesnât appear in the tag list, but I just typed it in and it works.
Thank you very much.
Can you tell us how to express the tag for KM?
Just put an exclamation mark (boolean âNOTâ term) in front of the expression as shown belowâŚ
100*!(([LANG_LOC]==âen_GBâ)+([LANG_LOC]==âen_USâ))
I put this expression in Opacity for miles text: (([LANG_LOC]==âen_GBâ)+([LANG_LOC]==âen_USâ))? 100: 0
and this expression for km text: (([LANG_LOC]==âen_GBâ)+([LANG_LOC]==âen_USâ))? 0: 100
I am in the USA and it still shows km on my watch. Any idea what could be wrong? I tried setting the value to [LANG_LOC] and it shows en_US on my watch.
If I change the condition to ko_KR in watch face studio it works in the preview but itâs not working on my watch in USA.
Your expressions are correct, but the problem is that the quote marks have been subtly altered, probably when I posted the formula into the forum. They seem to get converted into âsmart quotesâ which are different characters from regular quotes, so WFS will not be able to correctly interpret the formula.
Replace the quote marks in your opacity field tag expression with ones that are typed directly in at the keyboard and you should be good to go!
If you do not want inserted formulas to get affected by automatic forum formatting, then mark them as preformated text:
Thank you rob1585568856, it worked.
Thanks Peter, Great tip. Iâll try to remember next time!
Hello! I am trying to put the expression you have shown above by changing the omillas but it does not work on my device or on the computer. Can you put the correct expression to check if I am making a mistake? Thanks
100*(([LANG_LOC]=="en_GB")+([LANG_LOC]=="en_US"))
Ron
Thanks for the help, it works!
Hi i have used these tags
for KM 100*!(([LANG_LOC]=="en_GB")+([LANG_LOC]=="en_US"))
for MILES 100*(([LANG_LOC]=="en_GB")+([LANG_LOC]=="en_US"))
but on my watch it shows me Miles not KM despite LANG_LOC = en_GB
Hi gmpanh,
The formula is working correctly. It is supposed to show miles when [LANG_LOC] is en_GB or en_US.
Rob
Ok, is it possible to make it KM when en_GB is selected as in UK people use KM not miles.
Hi, yes itâs possible to change the formula. You would just remove the test of en_GB from the fomula. But there is no need. The UK uses miles.