# Customize dqMan

Go to the ***Extras** men&#x75;**>Options*** to adapt the features and functionalities of dqMan. &#x20;

The last open category is saved when leaving the options dialog and restored on the next visit.

### General <a href="#toc312150312" id="toc312150312"></a>

The General category has four subsections:

* [**Settings**](#settings)
* [**Login**](#login)
* #### [Shared Favorites](#shared-favorites-1)
* #### [Documentation](#documentation-1)

#### Settings

<table><thead><tr><th>Setting Name</th><th>What It Does</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Open session at startup</strong></td><td>Automatically opens a session window at start up. Select the start view from the <strong>Start with</strong> list.</td><td></td></tr><tr><td><strong>Restore last executed query from history</strong></td><td>Restores the last executed DQL query from the history.</td><td></td></tr><tr><td><strong>Show toolbar</strong></td><td>Displays the toolbar.</td><td></td></tr><tr><td><strong>Show tabs for open windows</strong></td><td>Displays an additional toolbar with buttons for all open windows.</td><td></td></tr><tr><td><strong>Save History Data</strong></td><td>Saves DQL and API history data on local disk for later use. <strong>History size</strong> limits the size to the selected value. This limit is valid per session window.</td><td></td></tr><tr><td><strong>Autosize row heights</strong></td><td>Auto resizes the cells in the history list to <strong>Max Rows</strong> lines, if multi-line commands are displayed.</td><td></td></tr></tbody></table>

#### Login

<table><thead><tr><th>Option</th><th>What It Does</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Save login info</strong></td><td>Saves the login information, either with or without password.<br>If the option <strong>always show next unused login</strong> is activated, the login dialog initializes with the credentials used for the most recent login.</td><td></td></tr><tr><td><strong>Dump object with Autologin</strong></td><td>If a dump from a repository without valid session is requested, credentials from login history will be used for a valid session.</td><td></td></tr><tr><td><strong>Use full qualified repository names</strong></td><td>If selected, fully qualified repository names (<code>repository.content_server_name@host_name</code>) are used to identify the repository.</td><td></td></tr><tr><td><strong>Order login history by</strong></td><td>Sorts the displayed order of saved logins in the login history.</td><td></td></tr><tr><td><strong>Edit history</strong></td><td>Modify the saved logins in the login history.</td><td></td></tr></tbody></table>

#### Shared Favorites

Object Functions and the DQL favorites are stored locally, therefore every instance of dqMan uses its own data. However, Favorites can be shared if the full paths to the shared favorite files are supplied. The XML files which contain the favorites and Object Functions (*DQL-Repository.xml* and *Functions.xml*) need to be copied to a network drive for sharing. If the shared files are not available, local versions will be used instead.

#### Documentation

You can add and manage links to documents, URLs or program files to the **Documentation** menu using the function bar:

![Add documentation to the selected Job](https://719145889-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F34SqczmUmN6PfmZmjkFe%2Fuploads%2FUHUv2ViBJNH4dgLJvHZU%2FJobs%20Options.PNG?alt=media\&token=1749e28d-b12c-40da-9e60-cbf289f5e8f0)

<table><thead><tr><th>Function Bar Element</th><th>What It Does</th><th data-hidden></th></tr></thead><tbody><tr><td><img src="https://719145889-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F34SqczmUmN6PfmZmjkFe%2Fuploads%2FBc0PEijlM8VHB9hyuYXZ%2FAdd%20Documentation%20item.png?alt=media&#x26;token=69c9a620-0bc3-43bf-b912-0e4696da7b13" alt=""></td><td>Add item. When entering a URL or program file, type it into the cell manually.</td><td></td></tr><tr><td><img src="https://719145889-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F34SqczmUmN6PfmZmjkFe%2Fuploads%2FmkAU2ghFToK1ILd9huao%2FDelete%20Documentation%20item.png?alt=media&#x26;token=fb59a479-43de-45de-bda7-82ce3bf8b8b1" alt=""></td><td>Delete the selected entry.</td><td></td></tr><tr><td><img src="https://719145889-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F34SqczmUmN6PfmZmjkFe%2Fuploads%2FsDGDRWnRbRgKIKKNxBhr%2FDocumentation%20Item%20Separator.png?alt=media&#x26;token=7676fd34-5734-4fab-a93f-bc8bc28eb6ff" alt=""></td><td>Add a menu separator</td><td></td></tr><tr><td><img src="https://719145889-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F34SqczmUmN6PfmZmjkFe%2Fuploads%2F16ki1bOVr19ac1LOmgN0%2FMove%20Documentation%20Item%20Up.png?alt=media&#x26;token=f9c376e8-d97a-41de-8451-a629ff3d1f39" alt=""></td><td>Move selected entry upwards</td><td></td></tr><tr><td><img src="https://719145889-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F34SqczmUmN6PfmZmjkFe%2Fuploads%2FgvSxVurKaAMqlbn128BR%2FMove%20Documentation%20Item%20Down.png?alt=media&#x26;token=f8007687-139c-4120-b048-1de7d1648bb6" alt=""></td><td>Move selected entry downwards</td><td></td></tr></tbody></table>

### The API Command View

<table><thead><tr><th>Command</th><th>What It Does</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Show API hints</strong></td><td>Shows hints with syntax information for API commands.</td><td></td></tr><tr><td><strong>Clear input fields</strong></td><td>After the successful execution of a command, the input controls are emptied. In case of error, the command remains for correction.</td><td></td></tr><tr><td><strong>Reversed API log direction</strong></td><td>Adds new lines at the top of the log.</td><td></td></tr></tbody></table>

### The DQL Command View

#### Settings&#x20;

<table><thead><tr><th>Setting</th><th>What It Does</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>DQL syntax help</strong></td><td>Enables syntax help for DQL commands and functions.</td><td></td></tr><tr><td><strong>Auto indent</strong></td><td>Indents the cursor in new lines. Leading tabs and spaces will be copied from the proceeding line.</td><td></td></tr><tr><td><strong>Restore column order and width</strong></td><td>If the names and number of columns are not changed, the DQL result list settings (column width, column order and visible columns) will not change if DQL queries are executed again.</td><td></td></tr><tr><td><strong>Reverse displayed order of repeating attributes</strong></td><td>DQL queries usually return values of repeating attributes in reversed order. This option reverses the order again.</td><td></td></tr><tr><td><strong>Move focus to DQL Result List after query execution</strong></td><td>Moves the focus to the DQL Result grid if the query was successfully executed; If cleared, the focus remains in the DQL area.</td><td></td></tr><tr><td><strong>Autosize columns</strong></td><td>Column widths are adapted to the length of the represented data, with the limitation defined in the <strong>Max. Characters</strong> field.</td><td></td></tr><tr><td><strong>Autosize rows</strong></td><td>Row heights are adapted to the maximum number of lines of repeating attributes, with the limitation defined in the <strong>Max. Rows</strong> field.<br>This option does only apply if the DQL query contains repeating attributes and their values are separated by carriage return.</td><td></td></tr><tr><td><strong>Separate repeating attributes</strong></td><td>Values of repeating attributes can be separated by comma/semicolon/carriage return/tab/custom string.</td><td></td></tr><tr><td><strong>Enclose single values with</strong></td><td>Encloses values of repeating attributes with single/double quotes or with no character at all if nothing is selected.</td><td></td></tr></tbody></table>

#### Code Editor: Grid Colors&#x20;

<table><thead><tr><th>Command</th><th>How It Affects Grid Colors</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Highlight even lines (background)</strong></td><td>Background color for even lines.</td><td></td></tr><tr><td><strong>Marked lines (background)</strong></td><td>Background color for marked rows.</td><td></td></tr><tr><td><strong>Different columns (background)</strong></td><td>Background color for cells with different content (from Compare data function)</td><td></td></tr></tbody></table>

#### Code Editor: Grid Hints

Grid Hints show additional information for single objects. They become faded in when the mouse is moved onto the row header (containing the row number).

Grid Hints can be defined for different object types. They consist of a hint template and translations. A Grid Hint template contains the following elements:

<table><thead><tr><th>Grid Hint Element</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>Freely selectable, shown in the grid hint list.</td><td></td></tr><tr><td><strong>Typetag</strong></td><td>Single Documentum type tag (for example, <code>dm_document</code>). Instead of a type tag, you can enter a type name that will be  automatically replaced with the type tag.</td><td></td></tr><tr><td><strong>Values</strong></td><td>Hint template. References to attributes must be enclosed in curved clips and will be replaced automatically. All valid attributes of the type can be referenced. All other text and invalid attributes will be copied without changes.</td><td></td></tr><tr><td><strong>Display repeating values in</strong></td><td>You can displace repeating values in columns (the entire line is copied for each value in the attribute) or rows (values are comma separated).<br>If more than one repeating attribute is in the same line and displayed in column mode, the individual value indices are correlated (see <a href="#9.3.4.-grid-hints">Grid Hints</a> for <code>dm_acl</code> objects).</td><td></td></tr></tbody></table>

Translations turn values into readable designations. They are valid globally, that is, a translation for the attribute `client_capability` is valid for all defined **Grid Hints**.

<table><thead><tr><th>Translation Name</th><th>Role</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Attribute</strong></td><td>The name of the Documentum attribute.</td><td></td></tr><tr><td><strong>Bitwise translation</strong></td><td>Translates bitwise coded values, such as the attribute <code>user_privileges</code> of the type <code>dm_user</code>. Use comma separators for multiple values.</td><td></td></tr><tr><td><strong>Values</strong></td><td>Mapping of attribute values to displayed designations.</td><td></td></tr></tbody></table>

#### Describe Options

These settings have already been described in [#16.3.5.-describe-options](#16.3.5.-describe-options "mention").

### The Repository Navigator

In the Repository Navigator, you can manage the Cabinets/Folder Tree, the Object Type Tree and the Group Tree.

* The Cabinets/Folder Tree

<table><thead><tr><th>Cabinets/Folder Tree Setting</th><th>What It Does</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Auto expand at startup</strong></td><td>The cabinet level is loaded and displayed on login.</td><td></td></tr><tr><td><strong>Hide private cabinets</strong></td><td>Private cabinets of other users get hidden. However, private cabinets of the current user are always visible.</td><td></td></tr><tr><td><strong>Autoformat queries</strong></td><td>Generated queries from query templates get formatted automatically.</td><td></td></tr><tr><td><strong>Clear histories</strong></td><td>Clicking this button clears the history for the <strong>Create Cabinet/Folder</strong> and <strong>Create Document</strong> functions.</td><td></td></tr><tr><td><strong>Query templates</strong></td><td>Queries the templates to generate DQL queries, displayed in the context menu of the repository tree.<br>A query template consists of:<br>- <strong>Name</strong>: Freely selectable name, displayed in the context menu.<br>- <strong>Query</strong>: Template of the DQL query. The code <code>{*}</code> is with the current folder path of the selected folder in the repository tree.<br><code>Select * from dm_document where folder ('{*}')</code><br>Additional available options:<br>- <strong>Use as default</strong>: Activate this option to define one standard template which is not displayed in the context menu but is called directly by left/center-clicking.<br>- <strong>Enable direct execution</strong>: If activated, the generated DQL query will be executed immediately. This sort of template is marked with a green arrow in the context menu.</td><td></td></tr></tbody></table>

* The Object Type Tree

<table><thead><tr><th>Object Type Tree Setting</th><th>What It Does</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Auto expand at startup</strong></td><td>The first level is loaded and displayed on login.</td><td></td></tr><tr><td><strong>Autoformat queries</strong></td><td>Generated queries from query templates get formatted automatically.</td><td></td></tr><tr><td><strong>Show customized types only</strong></td><td>Only customized types and all types with customized subtypes are displayed in the tree. In addition, all Documentum base type tables are hidden, for example, <code>dm_sysobject_s</code>, whether registered or not.</td><td></td></tr><tr><td><strong>Start with</strong></td><td>Object type to start with (Type tree only).</td><td></td></tr><tr><td><strong>Query templates</strong></td><td>There are two kinds of query templates, for <code>dm_type</code> objects and for registered tables. For more information, see <a data-mention href="../repository-navigator#the-cabinet-folder-tree">#the-cabinet-folder-tree</a>.</td><td></td></tr></tbody></table>

* The Group Tree&#x20;

<table><thead><tr><th>Group Tree Setting</th><th>What It Does</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Auto expand at startup</strong></td><td>The first level is loaded and displayed on login.</td><td></td></tr><tr><td><strong>Autoformat queries</strong></td><td>Automatically formats queries generated  from query templates.</td><td></td></tr><tr><td><strong>Group top level by first &#x3C;xx> characters</strong></td><td>A repository can contain a large number of groups. This option lets you create an additional first level in the group tree for better overview by grouping the group names by their first <em>&#x3C;xx></em> characters.</td><td></td></tr><tr><td><strong>Limit no. of groups to</strong></td><td>Limits the number of queried groups.</td><td></td></tr><tr><td><strong>Query templates</strong></td><td>For more information, see <a data-mention href="../repository-navigator#the-cabinet-folder-tree">#the-cabinet-folder-tree</a>.</td><td></td></tr></tbody></table>

### The Script Views&#x20;

<table><thead><tr><th>Setting</th><th>What It Does</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Clear script log at restart</strong></td><td>Clears the script log area every time a script is executed.</td><td></td></tr><tr><td><strong>Copy comments to script log</strong></td><td>Copies comments in the script to the script log.</td><td></td></tr><tr><td><strong>Add line numbers to script log</strong></td><td>The line number of the command is added to the script log. If line numbers are stored, the context menu function <strong>Show command</strong> enables you to jump from any line in the log to the corresponding command in the script.</td><td></td></tr><tr><td><strong>Synchronize log to file</strong></td><td>Enables allows copying all log messages into a file. If selected, the user has to choose a target file every time a script is started. If an existing file is selected, the additional content will be appended to the existing file.</td><td></td></tr><tr><td><strong>Log everything</strong></td><td>Logs everything.</td><td></td></tr><tr><td><strong>Log results only</strong></td><td>Only logs results or error messages.</td><td></td></tr><tr><td><strong>Log errors only</strong></td><td>Only logs error messages.</td><td></td></tr><tr><td><strong>Log nothing</strong></td><td>Nothing is logged.</td><td></td></tr><tr><td><strong>CSV format for query results</strong></td><td>(Only valid for DQL script log) Results of DQL queries are logged in CSV format.</td><td></td></tr><tr><td><strong>Fixed width for query results</strong></td><td>(Only valid for DQL script log) Results of DQL queries are logged as lists with fixed width. If too long, the values can be truncated.</td><td></td></tr><tr><td><strong>Next line</strong></td><td>Color of the next script command to be executed (in debug mode only).</td><td></td></tr><tr><td><strong>Error</strong></td><td>Color of an incorrect script command (in debug mode only).</td><td></td></tr></tbody></table>

### Functions <a href="#ref285204368" id="ref285204368"></a>

Functions are user programmable extensions. There are two different types of functions:&#x20;

* **Object functions**, available from the DQL result grid, can contain references to the DQL result grid, as known from the Script Generator. On execution, the function is executed once for every selected object whereby the references are replaced with values from the current result grid.
* **Session functions** need a valid session and are executed only once. They cannot reference any values from the current session window.

dqMan is installed with a number of object and session functions that demonstrate the use of the extended functionality described below. If you have any more questions, send us an email at <dqMan@fme.de>.

#### Object Functions

This page displays all the available functions and provides tools to manage them, such as edit, copy a function, add and delete a function  :

* Edit a function
* Copy a function
* Add a function
* Delete a function
* Copy a function
* Export selected functions to XML for exchange with other dqMan users.
* Import functions from XML file.

You can deactivate object functions without deleting them, in which case the function name is cleared.

**The Object Function Assistant** is used for easy creation and modifying an assistant.

**Settings**:

<table><thead><tr><th>Setting</th><th>What It Does/What It Is</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>Name of function, displayed in the context menu.</td><td></td></tr><tr><td><strong>Typetag list</strong></td><td>Comma separated list of Documentum type tags (for example, <code>09 = dm_document</code>) to restrict the function to certain object types. You can use type tags instead of type names and they will automatically be replaced by type tags.<br>To assign a function to all object types, you can enter the * character.<br>If left blank, the function is always available. But it will only be executed once irrespective of the number of selected data records (the example function <code>Last SQL statement</code> uses this feature).</td><td></td></tr><tr><td><strong>Repository List</strong></td><td>Enables the allocation of functions to one or more repositories. Repositories can be either added manually or selected from a repository list.<br>You need to use comma separators for multiple repository names.<br>Adding an exclamation mark in front of the repository name (for example, <em>! testdocbase</em>, hides this function if this repository is active.</td><td></td></tr><tr><td><strong>Result</strong></td><td>The result of a function execution can be presented in different ways:<br>- <strong>Count processed objects</strong>: Shows the number of processed objects in a dialog box.<br>- <strong>Show result in dialog</strong>: Shows the results in a dialog box.<br>- <strong>Open textwindow</strong>: Opens a text window to display the results.<br>- <strong>Pass to operating system</strong>: Passes the result to the operating system (e.g. result of a <code>getfile</code> command)<br>- <strong>Execute as Subquery</strong>: Opens a copy of the current session window and executes a DQL query.<br>- <strong>Do nothing</strong>: No action is taken.<br>(The <strong>Copy to Clipboard</strong> option has been replaced by the variable <code>%Clipboard%</code>, which provides more flexibility)</td><td></td></tr><tr><td><strong>Category</strong></td><td>Functions can be grouped by assigning a category. A category name represents a submenu of the context menu, where all functions of this category are listed.</td><td></td></tr><tr><td><strong>Shortcut</strong></td><td>A shortcut for the function can be set by selecting a value from the dropdown list.</td><td></td></tr></tbody></table>

**Options**

<table><thead><tr><th>Option Name</th><th>What It Does</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Allow multiselect</strong></td><td>Enables selection and processing of multiple objects.</td><td></td></tr><tr><td><strong>Ask user before execution</strong></td><td>Execution must be confirmed first.</td><td></td></tr><tr><td><strong>Active</strong></td><td>Inactive functions are not visible in the context menu.</td><td></td></tr><tr><td><strong>Ignore errors</strong></td><td>In case of error, the execution continues with the next object. Error messages are displayed in the function result message after processing all objects.</td><td></td></tr><tr><td><strong>Create Debug Script</strong></td><td>This option is for function development only. Instead of executing the function, the resulting API script opens in the API Script View, if the function was executed from a DQL Result List. If not, it will open in an extra text window and can be copied into any API Script view for execution.<br>The generated debug script is full runnable in dqMan.</td><td></td></tr></tbody></table>

**Targets**

<table><thead><tr><th>Target Option</th><th>What It Does</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>DQL Result List</strong></td><td>Function is available in DQL Result List</td><td></td></tr><tr><td><strong>Repository Navigator</strong></td><td>Function is available in Repository Navigator</td><td></td></tr><tr><td><strong>Object Navigator</strong></td><td>Function is available in Object Navigator</td><td></td></tr></tbody></table>

On the second page (not available for option *Execute as Subquery*), you can define global variables. When calling the function, these variables are filled in either by the user's manual input or by queries from the repository, using API commands. The values of the global variables are valid for all objects processed in one function call.

In the variables, you can also reference column values of the DQL result list (for example, `{r_object_id}`). In this case, the function can be executed for single objects only. The option **Allow multiselect** is deactivated automatically.

The DQL query:

`Select full_format from dmr_content where any parent_id = '{r_object_id}’ order by 1`

results in a pick list that contains all available formats of an object. The column `r_object_id` must be contained in the DQL result list and only one object must be selected, otherwise this function is disabled.

To check the syntax of a DQL query, click the **Check syntax** button, if a valid session is available in any session window.

**Field type**:

<table><thead><tr><th>Field Type Setting</th><th>What It Is/What It Does</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Input field</strong></td><td>For value input.</td><td></td></tr><tr><td><strong>Input field with fixed valuelist</strong></td><td>Input field with fixed value assistance that you must enter into the Valuelist Data control.<br>If items in the value list contain the characters<code>||,</code> the part before<code>||</code>is displayed in the control list; the part after <code>||</code>will be returned as value (for example, <code>Label||Value</code>).</td><td></td></tr><tr><td><strong>Input field with DQL query list</strong></td><td><p>An input field with value assistance that is filled with the results of a DQL query. Enter <strong>The DQL</strong> in the respective field.<br>If the selected list of the DQL query contains more than one attribute, the value of the first column is added to the value list and the value of the second column is returned as variable value.<br>The query</p><p><code>Select object_name</code>, <code>r_object_id</code> from <code>dm_document</code> fills the list with the <code>object_name</code> attribute of all <code>dm_document</code> objects. Selecting a name from the list returns <code>r_object_id</code>.</p></td><td></td></tr><tr><td><strong>Date picker</strong></td><td>Displays a date picker control.</td><td></td></tr><tr><td><strong>File open dialog</strong></td><td>An input field with a <strong>Browse</strong> button. You can enter a list of allowed file types in the <strong>File Formats</strong> control. </td><td></td></tr><tr><td><strong>Directory selector</strong></td><td>Enables you to select a directory from the local file system.</td><td></td></tr><tr><td><strong>Cabinet/Folder selector</strong></td><td>Enables you to select a cabinet or folder from the currently connected repository.</td><td></td></tr><tr><td><strong>API Command</strong></td><td>A single line API command, such as <code>id,c,</code>dm_acl. This command can reference the <strong>Results</strong> list columns by column names in curved clips, for example <code>{r_object_id}</code>.<br>It can also reference global variables with a lower index than itself (See function Change ACL under Change Obiecttype for more information).</td><td></td></tr><tr><td><strong>Name</strong></td><td>Name of the variable which you can use to reference the variable in the API sequence function.</td><td></td></tr><tr><td><strong>Label</strong></td><td>Caption displayed in the input dialog. If no label is available, the name will be displayed.</td><td></td></tr><tr><td><strong>Default Value</strong></td><td>The default value shown in the input control. If <strong>Show always</strong> is selected, this value always appears, otherwise it is only valid until another value is entered or selected. This new value will then be displayed the next time the function is executed.<br>You can reference columns of the DQL result grid using standard syntax, such as <code>{object_name}</code>.</td><td></td></tr><tr><td><strong>Mandatory</strong></td><td>Select if field is mandatory.</td><td></td></tr><tr><td><strong>Use cached query</strong></td><td>If selected, the result of the DQL query used to fill the value assistance is cached to improve performance, but changes to the underlying values will be ignored. Go to <em><strong>Session</strong> menu<strong>>Refresh Valuelists</strong></em> to clear cache.<br>To add a new variable, click the <strong>Add variable</strong> button. <br>To remove the current variable, click <strong>Delete Variable</strong>.</td><td></td></tr></tbody></table>

The third page of the dialog either displays a `textfield` for the API sequence or for a DQL query (the **Execute as Subquery** option).

**The Basic API Sequence Syntax**

The API sequence consists of a batch of API commands similar to an API script. References to values of the DQL result list are enclosed in curved clips. During execution, those references are replaced with values from the result list.

`fetch,c,{r_object_id}`\
`destroy,c,{r_object_id}`

There are different placeholders to access the data of the result list:

<table><thead><tr><th>Placeholder</th><th>What It Does</th><th data-hidden></th></tr></thead><tbody><tr><td>{*}</td><td>Rreferences the currently selected column of the <strong>Result</strong> list. If more than one column is selected, the function is deactivated.</td><td></td></tr><tr><td>{* ID}</td><td>The selected column must contain a valid object ID, otherwise the function is deactivated.</td><td></td></tr><tr><td>{* INT}</td><td>The selected column must contain an integer value.</td><td></td></tr><tr><td>{* TIME}</td><td>The selected column must contain a valid time value.</td><td></td></tr><tr><td>{* CHAR}</td><td>The selected column must contain a string value.</td><td></td></tr></tbody></table>

**Comments**\
Each line beginning with the # character or with // is regarded as a comment line.

`#fetch current object`\
`fetch,c,{r_object_id}`

`# destroy the current object`\
`destroy,c,{r_object_id}`

**Indenting**\
For functions, indenting is allowed for all kinds of instructions. All leading spaces and tabs will be removed prior to executing the command. For multiline commands the same amount of leading characters will be removed from all lines as was done for the first line, except any valid char is found.

`#Set ACL Domain`\
&#x20; `Set,c,{r_object_id},acl_domain`\
&#x20; `%ACL Domain%`

If you create debug scripts, all indents are removed.

**Variables** \
There are three different kinds of variables:&#x20;

* **Global variables**, defined in the object function assistant and filled once at function initialization. Their values are valid for all processed objects.&#x20;
* **Local variables**, used within the API sequence, valid only for the processing of the current object:

<table><thead><tr><th>Local Variable Name</th><th>How to Use the Local Variable</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Naming conventions</strong></td><td><p>You can freely any name but you must enclose it with %. They are not case sensitive. Examples:</p><p><code>%1%</code><br><code>%File-Contents%</code><br><code>%this is a variable%</code></p></td><td></td></tr><tr><td><strong>Assignments</strong></td><td><p>You can assign constants or results of API commands to a variable. Example:</p><ul><li><code>%Repository_Owner%=dmadmin</code> initializes the variable <code>%Repository_Owner%</code> with the value <code>dmadmin</code>(the Define command from earlier dqMan versions is not supported any more).</li><li><code>%ID% = id,c,dm_document, where object_name such as 'a%'</code> assigns the result of the API command to the variable <code>%ID%.</code></li></ul></td><td></td></tr><tr><td><strong>Concatenating values</strong></td><td><p>You can concatenate values in two ways:  </p><p><code>%ID% =+ Add this text</code><br><code>%ID% = %ID% Add this text</code></p></td><td></td></tr><tr><td><strong>Usage</strong></td><td>To use a variable, insert it at the appropriate position in the API command: <code>get,c,%ID%,object_name</code></td><td></td></tr></tbody></table>

* **Predefined variables**, as you can see here:

<table><thead><tr><th>Predefined Variable Name</th><th>How to Use the Predefined Variable</th><th data-hidden></th></tr></thead><tbody><tr><td><strong><code>%result%</code></strong></td><td>This variable saves the result to be returned, e.g. %result%=dump,c,{r_object_id}.<br>If %result% does not exist within the API sequence, the result of the last executed API command is returned.</td><td></td></tr><tr><td><strong><code>%CrLf%</code></strong></td><td>This is a constant containing a carriage return and a line feed. You can use it for result formatting.</td><td></td></tr><tr><td><strong>%Clipboard%</strong></td><td><p>Enables text data exchange with the clipboard. If used, the current content of the clipboard is pasted. If a value is assigned, it will be stored in the clipboard.</p><p>Also, concatenation is possible:</p><p><code>%Clipboard% = Any text %Clipboard% and more</code></p></td><td></td></tr></tbody></table>

Example:&#x20;

`# set ACL name`\
`set,c,{r_object_id},acl_name`\
`%ACL Name%`

`# Set ACL Domain`\
`set,c,{r_object_id},acl_domain`\
`%ACL Domain%`

`# Save`\
`save,c,{r_object_id}`

**Script Commands**\
Script commands extend the functionality of an object function. You can use placeholders or variables as parameters and they will be replaced by their values before executing the script command. Available script commands are:

<table><thead><tr><th>Script Command</th><th>What It Does</th><th data-hidden></th></tr></thead><tbody><tr><td><strong><code>#$EditFile</code></strong></td><td>Opens the currently processed object for editing and waits until the editor is closed.</td><td></td></tr><tr><td><strong><code>#$Refresh &#x3C;Column Name> {Column Name}</code></strong></td><td>Refreshes the DQL result list by fetching the values of all attributes in the column list from the repository. If the char <code>*</code> was specified as column list, all currently selected columns are refreshed.</td><td></td></tr><tr><td><strong><code>#$RemoveLine</code></strong></td><td>Removes the currently processed line from the DQL result grid without destroying the Documentum object.</td><td></td></tr><tr><td><strong><code>#$ShellExecute &#x3C;Program> {Parameter}</code></strong></td><td><p>Starts the <code>&#x3C;Program></code> with the supplied <code>&#x3C;Parameters></code> and returns control to dqMan without waiting for its termination.</p><p>The first parameter is the executable program. The number of parameters is free. Use space separators.</p></td><td></td></tr><tr><td><strong><code>#$ShellExecuteAndWait &#x3C;Program> {Parameter}</code></strong></td><td>Works like #$ShellExecute, but dqMan waits for the program to finish its execution.</td><td></td></tr><tr><td><strong><code>#$Sleep &#x3C;time></code></strong></td><td>Pauses the function execution for <code>&#x3C;time></code> milliseconds.</td><td></td></tr><tr><td><strong><code>#$Loop &#x3C;collection identifier></code></strong></td><td>Start of a loop through a collection</td><td></td></tr><tr><td><strong><code>#$Loop &#x3C;attribute_name{(object_id)}></code></strong>    </td><td>Start of a loop through the values of the repeating attribute from the object identified by the <code>object_id</code>; <code>object_id</code> is not supplied, the ID of the currently processed object from the result list is used instead.</td><td></td></tr><tr><td><strong><code>#$EndLoop</code></strong></td><td>Marks the end of the loop.</td><td></td></tr><tr><td><strong><code>#$FetchObject &#x3C;r_object_id></code></strong></td><td>Opens the Object Navigator and loads the object identified by <code>r_object_id</code>.</td><td></td></tr></tbody></table>

Example for a collection loop:

`%Collection%=readquery,c,select group_name from dm_group where any i_all_users_names = 'dmadmin'`

`#$Loop %Collection%`\
&#x20;`%group_name% = get,c,%Collection%,group_name`\
`#$EndLoop`

The handling of the collection is done by the `#$EndLoop` command. It is not necessary to add next or close commands.

The variable `%LoopIndex<i>%` does only exist within a loop and contains the current loop index, starting with 0. `%Loopindex1%` is the index of the first loop. `%Loopindex2%` would be the index of the second loop, if it is nested within the first loop.

Example for an attribute loop:

`%id%= id,c,dm_document`\
`#$Loop i_folder_id(%id%)`\
&#x20; `%Folder_ID% =get,c,%id%,i_folder_id[%LoopIndex1%]`\
&#x20; `#$Loop r_folder_path(%Folder_ID%)`\
&#x20;  `%FolderPath%=get,c,%Folder_ID%,r_folder_path[%LoopIndex2%]`\
&#x20; `#$EndLoop`\
`#$EndLoop`

The variable `%LoopIndex<i>%` is incremented each time the #$EndLoop command is executed. It can be used as index for the repeating attribute values.

**The DQL Query Syntax**

In the DQL query text area any DQL query can be inserted that is executable by dqMan. This includes comments, template fields etc.

To reference any values of the underlying DQL result list, insert the attribute names in curved brackets. If any referenced attributes are not available in the DQL result list, the function is disabled.

The multiselect option is not available for this type of function.

#### 17.6.2 Session Functions

Session functions are very similar to object functions. However, references to result list values, such as `{r_object_id}`, are not allowed; in addition, they are executed exactly once, independently from any selections made anywhere in the session window.

Go to the **Functions** menu to access installed session functions, which are only available if the active window is a session window with a valid session.

### Security

The security page allows hiding of one or more advanced “hazardous” admin features. You must proceed with caution as these features can easily create great damage, for example, the recursive destruction of complete folder tree branches. To avoid any mishaps, these features can be deactivated.

There is no protection for this setting. Every user can show or hide these functions according to their personal needs.

You can access the Security options by clicking ***Extras** men&#x75;**>Options>Security***.&#x20;

##
