Skip to main content
1-Visitor
January 13, 2021
Question

Vuforia Studio Binding Filter Functions

  • January 13, 2021
  • 2 replies
  • 1476 views

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

1-Visitor
January 13, 2021

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

 

 

16-Pearl
January 14, 2021

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?