|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Library Reference > Database > DBWQueryRevisionByUId |
Given the identifier of a DBWorks document, it fetches from the REVISION table of the DBWorks database the value of an assigned field.
Function DBWQueryRevisionByUid(Uid, Revision, FieldName)
Uid |
unique id of the document |
|---|---|
Revision |
revision you want to fetch values from |
FieldName |
Identifier of an existing field in the REVISIONS table of DBWorks For writing portable scripts across different localizations of the database, may be better to declare fields using the DBWLookUp function, that accepts as argument an identifier of a standard field. A list of the available identifiers for standard fields follows below: NAME_FIELD_DESCRIPTION NAME_FIELD_CREATED_BY |
After calling this function check the boolean value of the okDBW variable:
TRUE |
if succeeded in fetching the value |
|---|---|
FALSE |
otherwise |
If okDBW is TRUE, the function returns the requested value.
Function DBWQuery
Function DBWQueryByUid
docUId = 24
fCreatDate = DBWQueryRevisionByUid( docUId , "2", "CREATION_DATE" )
if (okDBW = False) then exit sub