Replaces an existing value of a search field if the field is already added to the search panel.
Adds the field to the search panel if didn't exist there previously.
Syntax
setFieldValue(field, value, null)
Arguments
field
the name of the field.
value
the value of the search field.
Return value
No return value.
Example
Sets the Department search field to 10 if it is empty. Add the following code to the AfterTableInit event of the List page:
set srchObj = getSearchObject("Employees")
value = srchObj.getFieldValue("Department", null)
if IsNull(value) then
srchObj.setFieldValue("Department", 10, null)
end if
See also: