|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Library Reference > Database > DBWQueryByUId |
Given the identifier of a DBWorks document, it fetches from the DOCUMENT table of the DBWorks database the value of an assigned field.
Function DBWQueryByUid(Uid, FieldName)
Uid |
the unique id of the document |
|---|---|
FieldName |
Identifier of an existing field in the Document table of DBWorks. For writing portable scripts across different localizations of the database, may be better to declare the field 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 description NAME_FIELD_CONFIGURATION configuration |
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 DBWQueryRevisionByUid
docUId = 24
fName = DBWQueryByUid( docUId , "FILE_NAME" )
if (okDBW = False) then exit sub