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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Simple Javascript Use in Thingworx Services

Kalpesh744
6-Contributor

Simple Javascript Use in Thingworx Services

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?

 

2 REPLIES 2

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. 

slangley
23-Emerald II
(To:Kalpesh744)

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

Top Tags