|  | 
 | ||||
|        | |||||
|  | ||||||
| Other Library Functions | ||||||
| function | dctm.set | 
| Library: Documentum access (OMDOCUMENTUM) Import: omdocumentum.xmd | 
export external function set
          value string command
    to    value string new-value
Argument definitions
You can use the dctm.set function execute Documentum Content Server API commands which set values. It is most often used to set the values of attributes or properties of objects in the Docbase. This function corresponds to the Documentum Client Library (DMCL) function dmAPISet. The applicable commands are documented in the Documentum Content Server API Reference Guide.
The first argument is a command string which specifies the property that will be set. The second parameter is the new value.
This example connects to a Docbase, creates a document object and sets the name of the object.
  import 'omdocumentum.xmd' prefixed by dctm.
  
  process
    local stream docbase  initial {"my_docbase"}
    local stream user     initial {"my_user_name"}
    local stream password initial {"my_password"}
    local stream session
    local stream asset-name   initial {"my_asset.txt"}
    local stream asset-id
  
    ; Connect to Docbase
    set session to dctm.result of "connect,%g(docbase),%g(user),%g(password)"
    assert session != ""
      message "Error connecting to Docbase %g(docbase) as %g(user):"
           || dctm.result of "getmessage,current"
  
    ; Create asset
    set asset-id to dctm.result of "create,%g(session),dm_document"
    assert asset-id != ""
      message "Error creating asset:"
           || dctm.result of "getmessage,current"
  
    ; Name the asset and link it to a folder
    dctm.set "set,%g(session),%g(asset-id),object_name" to asset-name
The following exceptions can occur when calling this function:
| Other Library Functions dctm.execute dctm.omdocumentum-version dctm.reader dctm.result dctm.set dctm.writer | 
Copyright © Stilo International plc, 1988-2008.