Calculate Tag with Value

Hi,

i can set colors for example with
[HR] < 80? green:red

Is there a way to calculate with the value from a progressbar?
for example
[Value of progressbar] < 50? red:green

Ciao
Stefan

Background:
I want to show the progressbar with data provider phone battery in green > 20% and in red < 20%.
So i want to change color or switch between two progressbars by changing x-position, but for all i have to calculate with the value from progressbar…
… or is there another way to do this?

Hi, Im not sure if this is possible but you can use two progress bars.
Green one with opacity 0 + 100*([HR]<80)
and red one with opacity tag 0 + 100*([HR]>=80)

1 Like

Your way is right but i do not want to calculate with heartrate, i want to calculate with the value of phone battery!
What can i use instead of [HR]?

Ciao
Stefan

[BATT_PER] will return the current battery percentage, if that’s what you’re asking.

Is the battery level from clock, but i need battery level from phone, i get it from data provider in the complication

Ciao
Stefan

There is a topic on this that has the answer you are looking for

Ron
Samsung Developer Relations