cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Countdown time in thingworx bind to widget

gabitudor
7-Bedrock

Countdown time in thingworx bind to widget

Hello,

 

i would like to create like a countdown timer in thingworx. that would count from 180 seconds to 0 basically and to have this binded in a mashup.

 

do you think something like this is possible? if so i would need some help.

 

i was thinking about creating a function that counts only once and appeal it in a for loop or something like this and save the current seconds in properties. 

1 ACCEPTED SOLUTION

Accepted Solutions

Refresh Widget has a AutoRefresh bindable property, you just need to bind something to ti (checkbox or alike)

View solution in original post

4 REPLIES 4

If you just need it on the Mashup Side (not server side) you can use a Refresh Widget and an Expression widget.

 

Expression widget with a parameter "value" of type NUMBER and the expression = ((value==undefined)||(value==null))?180:(value-1))

you need to bind the expression widget output to itself (value) and set to not automatically trigger.

 

Then the refresh widget just needs to trigger the expression widget.

 

To show up on the interface, just add a value display or another widget and bind the expression widget output to it.

thank you! that worked and i also managed to do it in a service. but right now i would like to add a start/stop button so when i press on stop the time would stop from counting down and when i press start the time will continue to go to 0

 

any idea on this one? i am thinking on having a service that would be triggered by the button

Refresh Widget has a AutoRefresh bindable property, you just need to bind something to ti (checkbox or alike)

that's super cool, thanks a lot!

Top Tags