Accessing the Script Designer
The Script Designer is a central feature in the TIVITY platform and the Scripting functionality is available in various areas.
Class Designer
Switch your app into Config Mode and navigate to the Class Designer. Navigate to Data > Classes to access the classes of the app.
​‌Select a class, if already available, and expand the Fields node to reveal the fields collections.
Real Field
Either you enter a field name in the Add new field data entry and hit Enter or you click an existing field to open the configuration view. Next, choose the Advanced
section and in the Real field
area you can either click on Create and open default script to add functionality to the field or click on
Open default script to modify existing functionality

Virtual Field
Any field which is marked with the code-fork icon on the right-hand side is a virtual field. Open the configuration view and switch to the
Advanced
section. Make sure the Get Expression Type in the Virtual Field
section is set to Script
and then click on either Create and open expression script or
Open expression script to access the script definition.

To remove an existing script from a Virtual field click on Delete expression script.
Pre-Script and Post-Script of an Action
Expand a class and open the Actions node to see the available functionalities. Open the configuration view to create or edit an Action. In the Advanced
section you click on Create and open Pre-Execute-Script to define a script that is launched before the action is executed or
Open Pre-Execute-Script to amend an existing script. Similarly, you click on
Create and open Post-Execute-Script or
Open Post-Execute Script to specify operations needed after the action has run.

A click on Delete Pre-/Post-Execute Script removes the script from your action.
Query Designer
Launch the Query Designer to create a new query or edit an existing query, and move to the Fields register. In the Virtual fields
section you click on either Create and open script to add a new script to the query or
Open script to modify an existing script.

Template Designer
Activate the Config Mode in your workspace and choose an application to configure. Navigate to the Template Designer under Views > Templates and create a new document template or edit an existing one. In the Template
section you click on either Create and open script to add a new script to the template or
Open script to modify an existing script.

Function Designer
Navigate to your app Functions and create or edit a function. Click on either Create and open script to add a new script to the function or
Open script to modify an existing script.

Scripts defined under Functions allow you to specify the Return Type of the value processed.
Workflow Designer
Open the Config Mode of your app and navigate to Execution > Workflows to access the list of Workflows. Either create a new workflow or edit an existing one. In the Element Diagram select a Transition or a Step, and access the Script Designer in the Script
section.
Click on either Create and open script to add a new script to the workflow element or
Open script to modify an existing script.

Last updated
Was this helpful?