Skip to main content
5-Regular Member
July 10, 2025
Solved

Using Variables in Vuforia Studio

  • July 10, 2025
  • 1 reply
  • 976 views

Hello everyone!

I'm trying to change the text of a widget if it meets the criteria in the if-statement. This should happen everytime a property on Thingworx is updated.

 

This is how my js-code looks like:

DG_10787729_2-1752162778395.png

SubscribeTest -> thing
A1F -> thing-property

Force_Indicator -> gauge
maxForce -> application parameter

 

My question is, if it is possible to use variables like this and if yes, then how?

And is there a detailed documentation about variables in Vuforia Studio (e.g. what you can do with them / how to use them)?

 

Software:
ThingWorx 9.6.1-b253
Vuforia Studio 9.25.6 (9.25.6.0)


I would really appreciate some help.

Best answer by ClayHelberg

You might be able to accomplish this with a simple binding and a filter. Try binding your A1F property from your thing directly to your gauge, and then add a filter to that binding that reads something like this:

if (value >= 200) {
 return twx.app.params["text"];
}
else {
 return value;
}

 

1 reply

18-Opal
July 11, 2025

You might be able to accomplish this with a simple binding and a filter. Try binding your A1F property from your thing directly to your gauge, and then add a filter to that binding that reads something like this:

if (value >= 200) {
 return twx.app.params["text"];
}
else {
 return value;
}

 

5-Regular Member
July 14, 2025

Hi @ClayHelberg!

Thank you for your help!
I only had to return the text for it to be displayed.
For some reason I didn't even consider applying a filter to the param.

I really appreciate your help!

Best regards,
Dan

18-Opal
July 14, 2025

I'm glad it worked for you!