|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Library Reference > Database > DBWSetRevisionStringFieldData |
Sets, in the REVISION table of DBWorks database, a string field using revision name and document unique id
Function DBWSetRevisionStringFieldData(Revision, DocUID, FieldToSet, FieldValue)
Revision |
The id of the revision to be modified. |
|---|---|
DocUID |
The document unique id |
FieldToSet |
Name of the field in which the value has to be set. |
FieldValue |
The value to set. |
TRUE |
if the value has been set properly in the field |
|---|---|
FALSE |
otherwise |
'this example shows how to set a specify note value for a document with sepcified UniqueID
'it looks for the revision A.3 of the current document and sets the string "third rev" in the NOTE field of the REVISION table
Sub Main()
DBWInit(TRUE)
Revision="3"
call DBWShell("CurrentDocument")
doc_uid=DBWResult("@DOCUMENT_UNIQUE_ID")
field_to_set=DBWLookUp("NAME_FIELD_NOTES")
field_value="third revision"
DBWSetRevisionStringFieldData Revision, doc_uid, field_to_set, field_value
if OkDBW = TRUE then
DBWMsgbox "OK in setting"
else
DBWMsgbox "Cannot set value"
end if
End Sub