OnSelectorDialogItemsDisabler.LST script file

<< Click to Display Table of Contents >>

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

OnSelectorDialogItemsDisabler.LST script file

Description

This script allows to deselect/disable items in the Document Selector Dialog.

Activation

It is executed if existing in the LST folder

Input

@CONTEXT

the context in which the script is run; possible values:

ReloadSkippedDocuments
BriefcaseWrite
BriefcaseRead
BriefcaseInconsistentParentChildStructure
RemoteAccessChangeOwnership
RevisionCheckout
RevisionCheckin
RevisionApprove
ShowRevisionCheckoutDialog
ShowRevisionCheckinDialog
ShowRevisionApproveDialog
WorkflowSubmitDocuments
ShowDocumentSelectorDialog

@UID

the unique_id of the document included in the dialoge.g.

@UID=<unique_id #1>
@UID=<unique_id #2>
...
@UID=<unique_id #N>

Output

@OKPROCESSED

0:stop the process;
1: proceed with program flow;

@UID

the unique_id of the document to be disabled in the dialoge.g.

@UID=<unique_id to be disabled #1>
@UID=<unique_id to be disabled #2>
...
@UID=<unique_id to be disabled #N>

@UID_DESELECT

the unique_id of the document to be enabled but deselected in the dialoge.g.

@UID_DESELECT=<unique_id to be deselected #1>
@UID_DESELECT=<unique_id to be deselected #2>
...
@UID_DESELECT=<unique_id to be deselected #N>

Example

Assume this as starting status: OnSelectorDialogItemsDisabler01

.VBSCRIPT

'.x64
sub main()
 DBWMsgbox "OnSelectorDialogItemsDisabler.LST"
 DBWInit(true)
  context = DBWInput("@CONTEXT")
 If context = "ReloadSkippedDocuments" Then
 ElseIf context = "BriefcaseWrite" Then
 ElseIf context = "BriefcaseRead" Then
 ElseIf context = "BriefcaseInconsistentParentChildStructure" Then
 ElseIf context = "RemoteAccessChangeOwnership" Then
 ElseIf context = "RevisionCheckout" Then
 ElseIf context = "RevisionCheckin" Then
 ElseIf context = "RevisionApprove" Then
  DBWoutput "@OKPROCESSED",1,ForWriting
  DBWoutput "@UID","1609",ForAppending   'here it sets to DISABLE the record with uid 1609
  DBWoutput "@UID_DESELECT","1611",ForAppending  'here it sets to DESELECT the  record with uid 1611
 ElseIf context = "ShowRevisionCheckoutDialog" Then
 ElseIf context = "ShowRevisionCheckinDialog" Then
 ElseIf context = "ShowRevisionApproveDialog" Then
 ElseIf context = "WorkflowSubmitDocuments" Then
 ElseIf context = "ShowDocumentSelectorDialog" Then
 End If
end sub

so the result will be as follows: OnSelectorDialogItemsDisabler02