Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
How to start with making services based on simple JavaScript on Thingworx? I am able to make mashup,thing and already made some SQL services ,but don't understand why I am unable to make some JavaScript services using simple onclick(),alert(),setTimeout() functions.It gives error i.e., like "-referenceError-<the function> is undefined".Than I got to know that Thingworx using Rhino JavaScript Engine which is not a simple JavaScript. Than how to use my simple JavaScript skill here on making thingworx services.What are the functions that Rhino JavaScript Engine recognizing from simple JavaScript?
Could you please give more details on what are you trying to achieve in your use case?
For example, for a button, we have in the mashup builder an event named clicked (under button properties as well as if you hover over the button after clicking it) which you can drag and drop to a service in the Data panel. This will trigger the service upon the button click. Refer this help center article. In the mashup builder itself, in the lower right side under Functions, you could configure a status message or a confirmation to be displayed upon a trigger such as a button click.
Hi @Kalpesh744.
If the previous response answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.
Regards.
--Sharon