Previous Topic: Advanced FeaturesNext Topic: Supporting Searches of Unlimited Size


Pre-search Processing

For a complex search definition it may be useful to perform some processing after the user has pressed the Run button, but before submitting the search request. For example, to ensure that the parameters specified form a valid combination or to generate new parameters derived from those specified.

This can be achieved by defining a function called OnSubmit in the <script> element of <parameters>. OnSubmit takes no parameters and should return either true to submit the search or false if the search is to be abandoned.

Similarly, it may be required to generate derived parameters when the search is saved. This can be achieved by defining a function called OnSaveSearch in the <script> element of <parameters>. OnSaveSearch takes no parameters and should return either true to continue to save the search or false if the save is to be abandoned.

Note: If 'Save and Run' is used, both the OnSaveSearch and OnSubmit functions will be called.