Scripts Tab - WorkView - Foundation 24.1 - Foundation 24.1 - Ready - OnBase - Premier - external - Premier

WorkView

Platform
OnBase
Product
WorkView
Release
Foundation 24.1
License
Premier

The Scripts tab allows you to configure scripts that are attached to specific WorkView object attribute field states. You can create scripts by providing code or in a user-friendly, point-and-click environment of Custom Action Rule System.

Scripts can be written and attached to the OnChange, OnFocus, and OnBlur attribute field states. OnBeforeLookup and OnBeforeOpenRelated hooks are available for relationship attributes.

Rules can be configured and attached to OnChange, OnFocus and OnBlur attribute field states.

Note: Rules cannot be created for relationship attributes.
Note: One script and one rule can be attached for the same event. In such case, the script is always executed first.

To create a script for an object state:

  1. In the Scripts tab, within the Properties pane, select the state you would like to associate with a script from the Scripts drop-down list.
  2. Set Handler Type to Script.
  3. Click Add. A script editor will be displayed.
  4. Enter the script in the script editor.

To create a rule, follow instructions in Configuring Rules.

You can modify a script by double-clicking on it or by selecting it and clicking Modify.

You can delete a script by selecting it and clicking Remove.

The following script events are available for attribute fields:

Event

Description

OnBeforeLookup

This event is used to apply constraints to the objects accessed when a lookup is initiated on a relationship attribute field. For example, you could have an Object with a Department attribute and an Employee attribute. Clicking the lookup icon for Employee can now limit the filter results to only Employees with the Department attribute shown on the original Object using this event.

OnBeforeOpenRelatedObject

This event is used to call a default view for a related object when a relationship attribute field is double-clicked. If a view other than the default first tab is desired to display upon opening an object, the following call has to be made in the script: event.srcElement.RelatedView = "name of view"

OnChange

This event is triggered when the value of an attribute field is changed.

OnFocus

This event is triggered when the cursor enters an attribute field.

OnBlur

This event is triggered when the cursor leaves an attribute field.

Note:

When there are relationship attributes on a view, all changes done through script must affect the primary look up attribute to execute correctly.