DRS

MAY Computer

Help

PERFORMDMSACTION

Applies to  

DRS (Module: wmDRS.dll)

Group  

DMS

See also  

PROCESSDRD

Performs other DMS specific/related and dependend action. Function returns 0 if operation failed or no item is affected otherwise the number of affected items. An item can be any object of the DMS that is added, modified or deleted during the specific action.

The ACTION parameter is the minimum parameter required to determine the DMS related action to perform.

Known properties:

Action    ... Main property determining the action to perform
DocID     ... ID of addressed document
Path      ... Folder or file path
Defaults  ... filename or string representing default (profile) data
FolderID  ... ID of addressed folder
SQL       ... SQL Statement
Lib       ... Library/Store
Title     ... Document or folder title
FileName  ... Document's or component's filename
SepStr    ... Separation string for lists
Column    ... A table column
Value     ... Some (mostly return) value

DRD[File] ... DRD text or filename
DAI[File] ... DAI text or filename
Filter    ... Filter criteria for SQL related actions
UserID    ... A specific UserID
UserList  ... A list of users (;-separated)
GroupList ... A list of groups (;-separated)
...

 

Known actions (case insensitive) and the appropriate properties:

SQLExec - Execute an SQL statement directly against DMS database
  SQL       ... SQL statement to execute (required).
  Lib       ... Addressed Library (optional).

SQLQuery - Execute an SQL query directly against DMS database
  SQL       ... SQL select statement to execute (required).
  Lib       ... Addressed Library (optional).

SQLRowCount - Returns the number of affected rows

SQLGetValue - Retrieve an SQL column from a before executed query
  Column    ... Resultset column to retrieve (required).
  Value     ... Column value (output parameter)

SQLGetAllValues - Read all column's values from an SQL query's current row
  <Column>  ... Each column name with the appropriate value (output parameters)

SQLNextRow - Go to next row in resultset of last executed query

SQLDone - Run this command if you finished retrieving SQL results

DeleteVersions - Delete older versions of a document
  DocID     ... Document for which older versions should be deleted
                (optional Lib and DocNr parameters can be passed instead).
  KeepVers  ... Number of versions to keep
                (if 0 no version will be deleted and nothing is done)

CreateFolder - Create a folder in DMS system
  Path      ... Full folder path (input parameter).
  Defaults  ... Profile defaults for the folder (input parameter).
  FolderID  ... Document id of deepest created folder (output parameter).

GetNewSystemID - Create new system id (for lookup entries)
  Lib       ... Library name.

SQLExist - Return number of found rows in database
  SQL       ... SQL query (select statement).
  Lib       ... Addressed Library (optional).

SQLInsert - Insert a new lookup entry
  SQL       ... SQL insert statement.
                %SYSTEMID% can be used as placeholder for a new system id.
  Lib       ... Addressed Library (optional).

FindDocID - Find a document's id by given title or filename
  Title     ... Document's title (should be unique).
  FileName  ... Document's filename.
                Title of FileName must be provided.
  Lib       ... Addressed Library (optional).
  DocID     ... Return value of style "<LibraryOrStory>-#<DocNumber>".

FindFolder - Find a folder upon given 
  Path      ... Folder path or (profile) title (input parameter)
  Lib       ... Addressed library (input parameter)
  FolderID  ... Found folder id (output parameter)

GetFolderContents
  Lib       ... Addressed library (input parameter)
  Path      ... Folder path or ID (input parameter)
  SepStr    ... Content id separation string, default is ";"
                (optional input parameter)
  GetFolders... 0|1|2 flag if sub-documents, sub-folders or both should be
                returned, default is 0 to return sub-documents
                (optional input parameter)
  ReturnMultiple ... 1|0 optional flag if all matching items should
                     be returned. Default is 1.
  Title     ... Optional search for specific contents to return only
                matching objects (input parameter).
  Contents  ... List of matching document or folder id's (output parameter)

ImportDAI
  DAI       ... DAI filename or text to import (input parameter)
  DRDFile   ... DRD destination filename (optional input parameter)
  DRD       ... DRD text (output parameter)

ExportDAI
  DRD       ... DRD filename or text to export (input parameter)
  DAIFile   ... DAI destination filename (optional input parameter)
  DAI       ... DAI text (output parameter)

GetUserList
  Filter    ... Optional filter (DMS specific) (input parameter)
  Lib       ... Library (input parameter)
  UserList  ... ";" separated user list (output parameter)

GetGroupList
  Filter    ... Optional filter (DMS specific) (input parameter)
  Lib       ... Library (input parameter)
  GroupList ... ";" separated group list (output parameter)
 
PerformLookup
  Column    ... Profile column name (input parameter)
  Value     ... Profile value (input/output parameter)
  Lib       ... Library (optional input parameter)
  Filter    ... Filter (optional input parameter currently not supported)
 
SelectLookupValue
  Column    ... Profile column name (input parameter)
  Value     ... Profile value (input/output parameter)
  Lib       ... Library (optional input parameter)
  Filter    ... Filter (optional input parameter currently not supported)
  Caption   ... Label (input parameter)
  InfoText  ... Info text explaining needed input (input parameter)
 
GetUserGroups
  UserID    ... Optional user id (input parameter)
  Lib       ... Library (input parameter)
  GroupList ... ";" separated group list (output parameter)

SQLInsert (Resolves %SYSTEMID% variable for Hummingbird DM)
  SQL       ... SQL statement to execute (required).
  Lib       ... Addressed Library (optional).

 

Important note: The supported actions may differ from DMS to DMS. You have to look up in the documentation of the DRS Implementation Interface component you are using or have to ask your distributor if and which Actions are supported. There might also be actions supported not listed here.

Important note: The <VariableName> parameter is multifunctional. First the general resultcode of the operation is stored in a script variable with this name. Second the variable name is prefix for all input and probable return values set by the performed action. This means that the <Parameters> parameter string will be split and the appropriate script variables will be set (see sample below). If the <Parameters> parameter is empty then parameters will be read from script variables beginning with <VariableName>_ prefix (as shown in sample).

 

Syntax

PERFORMDMSACTION <VariableName>[, <Parameters>][, <DMSName>]
DMSPERFORMACTION <VariableName>[, <Parameters>][, <DMSName>]

Part

Description

<VariableName> Script variable to store operation result and prefix for return values.
<Parameters> List of parameters in style <ParameterName>=["]<Value>["]{ <ParameterName>=["]<Value>["]}, in inifile style or in hyperlink querystring style beginning with question mark (?). If this parameter is empty then parameters will be read from script variables beginning with <VariableName>_ prefix.
<DMSName> DMS name.

 

 

Sample

SETVAL MyAct_Action, "EXECSQL"
SETVAL MyAct_SQL, "SELECT id, KdName FROM MyCustomers WHERE KdName LIKE 'MAY%'"
PERFORMDMSACTION "MyAct"
IF %SCR.MyAct% = 0 THEN MSGBOX "Operation failed."
SETVAL MyAct_Action, "SQLGETVALUE"
SETVAL MyAct_Column, "id"
PERFORMDMSACTION "MyAct"
;Now script variables content is:
;  MyAct_Action=SQLGETVALUE
;  MyAct_SQL=SELECT id, KdName FROM MyCustomers WHERE KdName LIKE 'MAY%'
;  MyAct_Column=id
;variable for general action return code:
;  MyAct=1
;and possibly the following variable (set by the called action SQLGETVALUE) is:
;  MyAct_Value=12345
;being the id for customer MAY Computer for example.