obj objRef mget

Available for: Content Management Server, Template Engine

Task: Returns the values of the specified file fields for the specified file.

Syntax:

obj (withId objId) | (withPath path) | root mget {objAttr}

Additional information: Instead of file fields you can specify version fields, provided that the file has at least one version. Regarding the values returned, the released versions have precedence over edited or committed versions. In the Template Engine, only released versions exist.

Function parameters:

  • attrName specifies the name of a file field whose value is being searched for (see File Fields).

Return value if successful: the values of the queried file fields (stringlist)

Necessary permissions (CM only): The user must have the permissionRead permission for the specified file. The file fields id, name, visibleName, path, visiblePath, and objType can be queried without having the permissionRead permission.

Example:

CM>obj withId 2003 mget objClass isEdited
publication 1