Skip to main content
May 28, 2018 5:07 AM UTC
Solved

How to round number parameter values in text box widgets

MyHome example in Get Started with ThingWorx for IoT includes a temperature parameter, streamed from server (value changes periodically). 

 

I want to display that in my Mash as a number, in a text box widget but can't figure out how to round up the numbers. 

 

Can anyone help please?

 

 

May 28, 2018 7:40 AM UTC

I don't know which widget did you use to use the temperature, but if you did use a ValueDisplay you have to go to ValueFormat parameter on widget and set Renderer: Number and on format 0.00 for instance to round to two decimals.

3 replies

pobiAuthor
May 28, 2018 5:08 AM UTC

I've attached my current Mashup.

May 28, 2018 7:40 AM UTC

I don't know which widget did you use to use the temperature, but if you did use a ValueDisplay you have to go to ValueFormat parameter on widget and set Renderer: Number and on format 0.00 for instance to round to two decimals.

pobiAuthor
May 29, 2018 1:26 AM UTC

That works. Thank you CarlesColl!