BeforeSearchSave Event

Description

This event fires after user has clicked the Save button to save a search, before the search is actually saved. It allows you to define a value for the 'userId' and 'securityGroup' field for the repository record where the Search will be saved.

The following variables are available to you in the event:

Variable
Description
e.tmpl

The grid component definition.

Your event can set these property values. These values will be included in the saved search record when it is saved in the repository.

Property
Description
e.userId

The id of the user used to filter the saved searches.

e.securityGroups

The security groups used to filter the saved searches.

Setting State Variables

You can also set state variables in this event. The value of any state variables will be available in all subsequent ajax callbacks (in the e.__si2 object).

To set a state variable:

e._state.myvar1 = "value1"
e._state.myvar2 = "value2"