|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Event Scripts > DataForm > OnOKFilter.LST script file |
It allows a reassignment of the filter form data for customizing the behavior of the filter, based on specific rules.
It's enabled after pressing the in the Filter Data Input Mask.
Options→Data input
any_field |
All the Filter Input Form fields |
|---|---|
@REVISION_PHASE |
this variable is passed if not null only; Remarks
|
@OKDATAFILTER |
If 1 confirms filter data. |
The following example shows how to always search on any sub-string of the ID field.
The filter, by default, anchors the search to the beginning of every field string;
in order to search a sub-string, the special character % must be prefixed to the search string.
The sample also shows how to avoid searching on specific fields ( in this case, the field COST ).
.VBSCRIPT
Sub main()
DBWInit(TRUE)
id = DBWInput("ID")
if id<>"" then
id = "%" & id
end if
cost = DBWInput("COST")
if cost<>"" then
DBWMsgBox "Operation not allowed"
DBWOutput "@OKDATAFILTER",0,ForWriting
exit sub
end if
DBWOutput "@OKDATAFILTER",1,ForWriting
DBWOutput "ID",id,ForAppending
End Sub