Script Builders

When creating an event handler, you can use one of the handy script builders instead of writing the script by hand. In the Event handlers configuration window, the script builders are accessible as tabs along the top. The last tab, Script Editor, lets you write an event handler by hand. You can also use it to view the script that was generated by the script builder, which is a good way to get started learning how to write event handlers by hand.

Action Qualifiers

All of the script builders allow you to put security and/or confirmation qualifiers onto the event handler. The security qualifier lets you restrict the event handler from running if the current user doesn't possess a set of roles. Use CTRL-select to pick multiple roles. The confirmation qualified will prompt the user with a popup Yes/No box. The action will only be executed if the user chooses Yes.

Navigation

The navigation script builder has various functions that deal with opening and closing windows.

Open / Swap

Opening is a very straight-forward operation - it simply opens the specified window. You are also given options to center that window within the Client, and to close the window that the event was fired from.

Swapping is the practice of opening another window in the same size, location, and state as the current window, and closing the current window. This gives the appearance of one window simply swapping into another, seamlessly. The navigation builder uses the swapWindow version of swapping, but most "by hand" script authors will us the swapTo version. This last version relies on the fact that the windows being swapped are both maximized windows. See the typical navigation strategy section for more information.

You can also pass parameters to the opened or swapped-to window. The names of these parameters must match names of custom properties on the root container of the target window. The values can either be literals or values of other properties from the source window. To use a property, highlight an empty cell in the Value column of the parameter table, and press the Insert Property ( images/download/attachments/6034372/image2015-5-5_13_39_20.png ) button. See the parameterized windows section for more information.

Forward / Back

These action give you a simple way of implementing browser-style forward/back buttons in your client. Note that you must be using the default navigation strategy for this to work, because these functions rely on calls to system.nav.swapTo in order to keep track of what the sequence of recent windows has been.

Closing Windows

These options allow for an easy way to have an event handler close the window that it is a part of, or any other window. Refer to the following sections for more information:

Set Tag Value

This event handler script builder will respond to an event by setting the value of a Tag. You can set the tag to either a literal value directly typed in, or you can use the Insert Property ( images/download/attachments/6034372/image2015-5-5_13_39_20.png ) button to have the handler use the value of another property from the same window.

SQL Update

This script builder helps you build an update query using a database browsing interface. Choose a spot in your target database and the update query will be built for you. By setting columns as key columns, you can have the filter correctly filter to the right row. You may use either literal values or property values by using the Insert Property ( images/download/attachments/6034372/image2015-5-5_13_39_20.png ) button next to the Update Value text box.

Set Property

This script builder will respond to an event by altering a property in the window. You must choose the property to alter, and the value that you wish to assign to it. The value can be a literal value or the value of any other property on the window by using the Insert Property ( images/download/attachments/6034372/image2015-5-5_13_39_20.png ) button.

Next ...