SetSearchEdit function
Syntax
SetSearchEdit([recordname.]fieldname)
Description
Use the SetSearchEdit function to enable system edits (edits specified in the record field definition) for the specified [recordname.]fieldname, for the life of the search dialog box, or until the ClearSearchEdit function is called with that same field.
Note:
This function remains for backward compatibility only. Use the SearchEdit field property instead.
See PeopleCode API Reference: SearchEdit property: Field class.
Parameters
| Parameter | Description |
|---|---|
|
fieldname |
The name of the search dialog field on which to enable field edits. |
Returns
Returns a Boolean value indicating whether the function executed successfully.
Example
This example turns on edits and system defaults for the SETID field in the search dialog box:
SetSearchEdit(SETID);
SetSearchDefault(SETID);
Using SetSearchEdit
In the Add mode search dialog, the following edits are performed when the end user clicks the Add button. In any other mode, the following edits are performed when the end user clicks the Search button:
-
Formatting
-
Required Field
-
Yes/No Table
-
Translate Table
-
Prompt Table
SetSearchEdit does not cause the FieldEdit, FieldChange, or SaveEdit PeopleCode events to fire during the search dialog.
You might use SetSearchEdit to control access to the system. For example, you can apply this function to the SETID field of a dialog box and require the end user to enter a valid SETID.
If you use this function in the SearchInit event, the search page options are limited to the "=" and "IN" operators.