OnFilter.LST script file

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Event Scripts > Browser >

OnFilter.LST script file

Description

If checked, DBWorks executes the script LST\ONFILTER.LST before showing the standard filter data input form.

Activation

Options→Data Input

Remarks

Note: This script must be used only if you have prepared a set of DataEntr2_class_subclass.txt forms, to differentiate the data input forms for different categories, based on the value of a particular field.

See the topic Tabs in the Data Form / DataEntr2 form definition files specifics for document type and sub-class in the DBWorks main help for more information on this issue.

Output

@OKFILTER

0: fail
1:Success

@CLASS

0: for projects
A: for assemblies
P: for parts
D: for drawings
G: for other documents

@SUBCLASS_FIELD_NAME

The name of the field that identifies the subclass of the document; it must be the same name used in the DataEntr2_CLASS.txt file for the parameter @SUBCLASS

@SUBCLASS_FIELD_VALUE

The subclass of the document; it must be one of the values declared in the DataEntr2_CLASS.txt file for the parameters @SUBCLASS_DefinitionFileExtension FieldValue

Example

.VBSCRIPT

sub main()
 DBWInit(TRUE)
 DBWOutput "@OKFILTER", "1", ForWriting
 DBWOutput "@CLASS", "P", ForAppending
 DBWOutput "@SUBCLASS_FIELD_NAME", "CATEGORY1", ForAppending
 DBWOutput "@SUBCLASS_FIELD_VALUE", "Screw", ForAppending
end sub

 

This example supposes that it exists a form for the subclass "Screw" of the documents of class PART; this means that the following three files must exist:

1.SCHEMA\Dataentr2.txt

2.SCHEMA\Dataentr2_P.txt, containing the lines:

@SUBCLASSFIELD CATEGORY1

@SUBCLASS_screw screw

3.SCHEMA\Dataentr2_P_screw.txt