Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hi there,
I am showing an information in the value display and this information is referent the weight where I use the unit "ton" (tonne). Like the image below:
To do it I used two value display, one to bind my value and other to write the unit (ton). Follow image below:
My question is: Is there any way to insert in the same value display the value and the unit? I have ever searched in the properties from value display and I did not find nothing about it.
Regards,
Leonardo.
Solved! Go to Solution.
You can use an Expression function, get your numeric input and the Unit together in one String, and then send the new result to the Value Display.
I've always just used the label next to the value display.
You can always make the background and line transparent and then overlay that over a box so it looks like a single display.
Hi @PaiChung
Thanks for your answer.
I do it too, but I would like to find some way to configure it in the same value display.
If I do not find other solution I will keep it.
Please post this request to the ThingWorx Ideas forum: https://community.ptc.com/t5/ThingWorx-Ideas/idb-p/thingworxideas
Either:
Or maybe just ask for both of the above...
Thanks,
Alessio
You can use an Expression function, get your numeric input and the Unit together in one String, and then send the new result to the Value Display.
That would be a solution if I had a single value display in a page. If I have to display multiple values of the same unit, for example, ten different kWh values, I would need to add ten different expressions.
Please correct me if I'm wrong, Typically a mashup consists of multiple values, often of the same unit, to display.
True, but for the 10 Expressions, they are having the similar script so it's easy to create and don't cost much resource as well.
Another solution is to use the Collection widget (previously called Repeater ). By repeating the same mashup according to the rows of the infotable input, you only need to configure 1 ValueDisplay+Label or 1 ValueDisplay+Expression for the design.
Yes, for sure there is a workaround.
I wouldn't consider adding N equal expressions a best practice.
I've also considered embedding the ValueDisplay / Label pair in a mashup, to be reused either as a Collection or as a Contained Mashup, however, we were not able to get rid of extra space (I think it was 8px if I remember correctly) between the two.
Both Collection, Contained Mashup and Expression are valid workaround though.