Editing the Scripts
Contents
Script Editing
Open the required Scripts (System, Master or Script Sets). The following menu bar will be displayed:
To view the topic properties click Properties on the menu bar. To return to the script select Script on the menu bar. The scripting grid will now be displayed in the editing pane.
Scripting Grid
- Script Step – The questions and options displayed in a hierarchical tree structure
- Rec – If checked, the selected response is recorded and added to the enquiry description
- Act – Indicates the type of action:
- DBW – Denotes a Databox Write DBR – denotes a Databox Read
- LNK – Denotes a Link to another Script
- MSG – Denotes a Message
- PRI - Denotes a Priority
- SVC – Denotes a Service Code
- TSK – Denotes a Task
- Action – Displays the selected Action
- Next Step - Indicates the next step to be taken from a drop down menu:
- Next Step (This is not displayed)
- End – Script finishes (will then return to any calling Script)
- Cancel – Script process cancelled
- Submit - This defines where a Script will terminate and navigate to the reults screen
- Section – Go to designated section of Script (these will be specifically named)
Edit Mode
Selecting Edit on the menu bar will change the icon to a lock. This indicates that editing is in operation and editing of other tabs is locked. The navigation pane now contains all the script items available for editing.
Script Items:
- Item Type – the drop down lists all the available elements.
The available Script links are dependent on the Script Type. Scripts within a Script Set can Link to Scripts within the same set, to Master and Systems Scripts; System Scripts can only Link to System Scripts. Master Scripts can Link to Master Scripts and System Scripts but not to Script Sets.
- Filter – type in characters to search for particular references. As characters are entered, a button is displayed which will clear the search.
The contents for each of the item types (the questions, message, etc) will need to have been created in advance - See Admin_Tools_Manual#Entities and Admin_Tools_Manual#Databoxes.
- Save - Saves any changes made since selecting edit.
- Restore - Restores the script to the last saved position.
- Delete - Deletes the selected code or line.
- Expand - Expand all the script steps within a script.
- Close All - Close all the script steps within a script.
- References -Displays a list of the scripts that this script is referenced by. Selecting a script from the list shows a preview of that script.
Any of the item types can be added to the script using drag and drop. Select an item from the list of items shown in the navigation pane. Left-click and hold the item with the left mouse button and drag the item to the required position and release. Questions can be dragged into the Script Step column. They can be placed after a question or a response in an option list question, before by holding down shift and releasing the mouse. Other items in the list are dragged in the same way onto the Action column.
Quick Editing
By right clicking on the Script Set or action column a context menu can be viewed, which allows for the creation of a new entity or action, or to edit an existing entity or action.
Adding an Action
If an action is already in place against a script step, dragging a new action and holding the Shift key forces the original item down a step, to allow the new action to be added. Clearer guidance has been added above the Script Grid to highlight any error status.
Duplicating Actions
By holding the Ctrl key and selecting a message, priority, service code or task already being used, these can be and moved to other positions within the script grid.
Displaying Properties
By double clicking on a script item a new tab will open that displays its current properties.
Sections
At key steps in a script, you may want major branches in the script logic as well as script elements that apply to more than one branch. To produce this logic, you can create sections within a script. When in script edit mode click 'Add and a new section is added to the end of the grid.
Sections are automatically named Section1, Section2, etc as they are added. These can be edited to create more meaningful headings as required.
Reordering Sections
Sections can be moved in the script grid by dragging and dropping them to the desired location. This can only be done above or below another whole section, rather then within a section. To aid visibility, the section header is coloured and extends across the script grid.
Questions
Select Questions from the item type list. The navigation pane now displays a list of available questions, showing the description and type:
Question types are:
- Address
- Check List
- Date Time
- External Form
- File Upload
- List
- Numeric
- Text
- Dynamic List
Messages
Select Messages from the item type list. The navigation page now displays a list of available messages, showing the code and description.
Messages are placed in the action column against either existing steps which have no actions or as the the next action if one or more already exists.
Services
Select Services from the item type list. The navigation pane now displays a list of available service codes, showing the code and description.
Services are placed in the action column against either existing steps which have no actions or as the the next action if one or more already exists. Services are displayed in the action column showing the code, the default priority (in brackets) associated with that service and the description.
Priorities
Select Priorities from the item type list. The navigation pane now displays a list of available priorities, showing the code and the description.
Priorities are placed in the action column either against existing steps which have no actions or as the the next action if one or more already exists. Priorities are displayed in the action column showing the code and the description.
Service codes and tasks are set up with default priorities. Inserting a priority on a lower step over-rides the default.
Tasks
Select Tasks from the item type list. The navigation pane now displays a list of available tasks, showing the code and the description.
Tasks are placed in the action column either against existing steps which have no actions or as the the next action if one or more already exists. Tasks are displayed in the action column showing the code and the description, the default Priority associated with that task and the description.
Databox – Read
Select Databox - Read from the item type list. The navigation pane now displays a list of available databoxes with read facility. Open any category to view the individual databox items
Databox Read is ''always'' added to the script step column. The databox name that is displayed will be the Databox - Group.Name or Group.Name.Expression, for example:
Group Name Script.Checkquantity
Group Name Expression Script.Checkquantity.Morethan10?
Databox – Write
Select Databox - Write from the item type list. The navigation pane now displays a list of available databoxes with write facility. Open any category to view the individual databox items
Databox Write actions are placed in the action column against existing steps so as to action the script step referencing it. The databox name that is displayed will be the Databox - Group.Name, for example:
Group Name Script.Checkquantity
Master Script Links
Select Master Script Links from the Item Type drop down list. The Navigation Pane now displays the Master Scripts. Open any Category to view the individual Topics – those highlighted in red have no Script steps set up within that script.
Scripts can be linked to each other. For example: the Script for ‘Basins’ contains a Call link to other Scripts.
This way, Scripts that involve using a number of branches can be broken up into ‘sub-Scripts’ to make editing and maintenance easier.
Unlike Script Set links, Master Script Links can only ever be 'called', i.e. the alternative method of 'restart' is not available (see Script Set Links below).
Master Script Links are placed in the Action column either against an existing step that has no other actions or, where that step has an existing action, it will be added as the next sequence with the word ‘Action’ placed in the Script Step column.
Script Links are displayed in the Action column showing Call, the Level (Master) and the Script Topic.
System Script Links
Select System Script Links from the Item Type drop down list. The Navigation Pane now displays System Scripts in the Custom Category.
Scripts can be linked. For example: the Script for ‘Basin – seal leaking’ contains a Call Link to a System Script for whether the repair is Tenant Responsiblity. Using this method, repetitive Scripts can be referenced from originating Scripts to make editing and maintenance easier.
Unlike Script Set links, System Script Links can only ever be 'called', i.e. the alternative method of 'restart' is not available (see Script Set Links below).
System Script Links are placed in the Action column either against an existing step, which has no other actions, or where that step has an existing action, it will be added with the word ‘Action’ placed in the Script Step column.
Script Links are displayed in the Action column showing Call, the Level (System) and the Script Topic.
Script Set Links
Script Set Links are only available for linking Scripts within the same Set.
Select Script Set Links from the Item Type. The Navigation pane now displays Script Set. Open any Category to view the individual Topics.
Select either:
Call - the Linked Script is called by the current Script. Once the Called Script ends, the scripting returns to the next step of the original Script.
Restart – the Scripting is transferred to the called Script and any Script Data collected from the original Script is deleted.
Scripts can be linked – in the example below, the Script for ‘Gutter – leaking’ contains a Call link to the Script ‘Gutter- blocked’. Using this method, repetitive Scripts can be avoided by reference to another Script to make editing and maintenance easier.
Script Set Links are placed in the Action column either against an existing step, which has no other actions, or where that step has an existing action, it will be added with the word ‘Action’ placed in the Script Step column.
Script Set Links are displayed in the Action column showing Call or Restart, the Category and the Script Topic.