Skip to main content
1-Visitor
December 28, 2021
Question

Use a Service from Thingworx

  • December 28, 2021
  • 1 reply
  • 3003 views

Hello,

 

I am working on a project connecting Thingworx and Vuforia Studio.
Right now I'm trying to use a service imported from Thingworx. This service takes a string as input, and outputs the name of a Thing (this works well on Thingworx when I test my service), this allows me to call the Thing of my choice to display its data.

 

However after having imported this service in Vuforia Studio, and having made the connections which seem correct to me, the service does not run. The input string comes from a textInput and the output Thing goes into a Dynamic Entity Name to change the current Thing on the data display.
For the connections I have linked the text of the textInput to the input parameter of my service, and the output, the Current Selected Element, I redirect it to the Dynamic Entity Name of the displayed Thing to change the current Thing. But when I test, in Preview, and that I put a character string in the textIput, the service is not called because the displayed data does not correspond to those of the Thing that I ask (whereas if I put the name myself of a Thing in the Dynamic Entity Name, the display works as expected, so the problem seems to be with the service).

 

What do you think I am missing for my service to lunch?

What can I do to fix it?

 

Thank you for the support.

Greetings

Sébastien

1 reply

16-Pearl
December 28, 2021

If I understand correctly you are setting the input from a text input box to a simple service that returns the Thingname. Do you have an event that causes the service to execute. For example you could use Value Changed event   

sgreywilson_0-1640713015713.png

 

1-Visitor
December 29, 2021

Thank you for your reply, you understand the situation correctly.
I have tried this exact same setup and nothing appears in the label when I enter something expected in the text input.

It is as if the service does not launch, despite the Value Changed event as a trigger for the service.

16-Pearl
December 29, 2021

2 things make sure you tab out of the field otherwise you will not get a change event and second try binding the service the a button to make sure the service is executed. Check Thingworx script log for errors (add a log statement in the service to register execution). If non of this helps share your project and service and I will take a look