Skip to main content
8-Gravel
January 29, 2021
Solved

Switch Visibility with togglebutton

  • January 29, 2021
  • 1 reply
  • 3505 views

Hello,

 

I want to switch the visibility option from a label and a slider in a Mashup

When the button is in the "OFF" state I want the label to be visible and the slider to be invisible.

When the button enters the "ON" state I want the label to be invisible and the slider should be visible.

 

My current configuration makes it so I can toggle the visibility how I want it for the slider but now the label.

Is it possible to have two options for the state from the togglebutton (OFF and ON)? right know I can only set the "STATE" option but I cannot choose which state and what the output value etc should be...

 

I am using ThingWorx 9.1.0-b10877 if that matters.

 

Thank you

Best regards

Nicolas HORST

Best answer by slangley

Hi @NHorst.

 

You could create 2 separate expressions in the Mashup - 1 for each widget to evaluate the current value and then switch it.  Here's a link to the Help Center for more information on expressions.

 

Regards.

 

--Sharon

1 reply

slangleyCommunity ManagerAnswer
Support
January 29, 2021

Hi @NHorst.

 

You could create 2 separate expressions in the Mashup - 1 for each widget to evaluate the current value and then switch it.  Here's a link to the Help Center for more information on expressions.

 

Regards.

 

--Sharon

NHorst8-GravelAuthor
8-Gravel
February 2, 2021

Hi @slangley ,

 

Thank you for your answer.

 

I will it with the expressions.

 

 

Best regards

Nicolas HORST