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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Translate the entire conversation x

Using Variables in Vuforia Studio

DG_10787729
4-Participant

Using Variables in Vuforia Studio

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.

ACCEPTED SOLUTION

Accepted Solutions

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;
}

 

View solution in original post

3 REPLIES 3

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;
}

 

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

I'm glad it worked for you!

Announcements
Top Tags