ThingWorx Model Definition and Composer > Things > Thing Services > Service Input Parameters
  
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 it 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 show up as a bindable parameter in the data properties panel in the Mashup Builder.
Service Input Parameter Naming
Name is a required field and uniquely identifies the parameter. You cannot have spaces, special characters (hyphens and underscores are ok, see below), or leading numbers (numbers in or at the end of the name are ok). 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 the 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";