Service Input Parameters
When creating a service, you can define input (and output) parameters. These parameters can be of any ThingWorx base type, and can be set as a required parameter on the service. If an input parameter is set as required, the service will not run if the parameter is not provided.
When the service is used in a mashup, the parameters appear as bindable parameters in the data properties panel in the Mashup Builder.
Service Input Parameter Naming
Name is a required field that uniquely identifies the parameter. You cannot have spaces, special characters (hyphens and underscores are allowed, see below), or leading numbers (numbers in or at the end of the name are allowed). Names are case-sensitive.
Input Parameters with Hyphens in the Name
While service input parameters can have hyphens in the name, they must be referenced in specific ways. From within the service where they are defined, the parameter must be referenced using this keyword and bracket notation. In the examples below, temp-01 is the input parameter name.
var result = this['temp-01'];
If you are calling the service from another service, you must pass the parameter using one of the following examples:
var params = new Object();
params['temp-01'] = "Some text";
or
var params = {};
params['temp-01'] = "Some text";