The following section will explain the data you can add to actions..
In Touch Portal you can augment your actions with additional data that the user has to fill in. It uses the same structures as the native actions from Touch Portal itself.
You can use this for both static actions as dynamic actions. The user will have to specify values for the given data field within Touch Portal. This can be inline like in version 2.1 or it can be done through a popup window. This also depends on the amount of data fields. The following objects can be used in the action array of a category:
The following is an example of a data object you can add to an action. Touch Portal will automatically show a popup when you add an action with data fields. The user can fill it in so he can customize the action. So here the user could fill in a number.
Here is another example of a data object. In this case we specify a few choices so that we limit the user what they can customize.
The next example shows a text data field. This is an open data type where the user can fill in a custom text value. This can be handy for example for names or text.
Our last example is of a switch action. This is an action you can turn on or off.
Each data object has its own combination of mandatory fields, use the example provided to create data fields. Below are the types and the explanation.
|id||Text||yes||1.0||This is the id of the data field. Touch Portal will use this for communicating the values or to place the values in the result.|
|type||Text||yes||1.0||The type of data:
|2.0||The type of data:
|label||Text||yes||1.0||This is the text used in the popup windows|
|Yes||1.0||This is the default value the data object has. Use the correct types of data for the correct type of data object. Eg: The switch data object expects a true or false here.|
|valueChoices||Collection||Yes||1.0||This is a collection of strings that the user can choose from.|
|extensions||Collection||Optional||2.0||This is a collection of extensions allowed to open. This only has effect when used with the file type.
eg: "extensions": ["*.jpg","*.png",]
|allowDecimals||Switch||Optional||2.0||This field can only be used with the "number" type and tells the system whether this data field should allow decimals in the number. The default is "true".|