Skip to main content
1-Visitor
May 26, 2016
Question

Can I reuse the Value parameter in State Based Formating?

  • May 26, 2016
  • 1 reply
  • 1645 views

Hello. I am trying to achieve the following result:

If value is 0, then display "None", otherwise display the value number (so if value is 10, display "10").

I can do it through services, but I was wondering whether I could do it only through a State Definition. Like maybe an expression that evaluates to the Value when it's put into Display Name field?

1 reply

1-Visitor
May 26, 2016

And making the widget visible/invisible?

anatapov1-VisitorAuthor
1-Visitor
May 26, 2016

No, the widget remains visible. I'd just like to have a Label that displays "None" or a number other than 0, depending on the input.

5-Regular Member
May 26, 2016

Arseni, would using a ValueDisplay widget make sense? For the ValueFormat field, you can set state-based formatting for that. For the styles, you can potentially create a style to be displayed when the value is 0, and use one for all others.