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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Vuforia Studio Binding Filter Functions

MS_9637805
2-Explorer

Vuforia Studio Binding Filter Functions

Hi, I was planning to manipulate the data coming from Thingworx Service using the following: 

return value.trim().replace("\"}]","").split("\":\"")[1]; with an example input being:  [{"result":"Data"}] . I want to implement this code in the binding filter but the output will contain nothing. Please help.
2 REPLIES 2
SurajPatil
13-Aquamarine
(To:MS_9637805)

what kind of manipulation you want to see it ..............can you please elaborate it.

 

I tried to convert float value to integer coming from thingworx platform and i used following code. please check if it may help u

 

return $filter('number')(value,2);

 

 

To simulate Thingworx input, I create a Application Parameter:

TWX-input: [{"result":"Data"}] 

dsgnrClarK_0-1610610052723.png

 

Then bind to widget "valueDisplay-1" 

dsgnrClarK_1-1610610104614.png

 

Edit Filter: return JSON.parse(value)[0].result

dsgnrClarK_2-1610610174685.png

 

In Preview

dsgnrClarK_3-1610610234668.png

 

Is this meets you need?

Announcements

Top Tags