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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Vuforia Studio Binding Filter Functions

MS_9637805
2-Guest

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

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?

Top Tags