The QueryConfig rules configure and extend the data available to bookmark templates in Microsoft Word.
The QueryConfig rule group is found in the Rules Maintenance tool on the System Admin Dashboard. Each rule in the group consists of a rule name, a filter value (which can be blank), and a result value.
Any Doc type
The QueryConfig rules accept a Doc type (as defined in the Doc Types tool and appearing in the filter drop-down) as the filter value. However, filters are rarely used.
Result values for the QueryConfig rules depend on the rule and are indicated within the description of each rule. Note: there is a 196-character limit in the result value field. If your text is longer than 196 characters, you will need to:
- Split your text into smaller segments, each of any length up to 194 characters,
- Append $+ to the end of each segment, except the last one.
- Add a rule row for each segment. These rules should have names that indicate they are a continuation of the first rule, for example: qDrawings:Alias.01, qDrawings:Alias.02, etc.
It is impossible to list all the possible rules in this rule group. There are a number of Spitfire-defined rules; you can review and override these defaults as necessary.
The various rules fall into the following types of entries:
Specifies (in the result value) the TSQL query that creates and defines an alias to be used in bookmarks on Microsoft Word templates and/or ATC Workflow scripts. If the template engine encounters a bookmark that references an undefined alias that begins with a q, it checks this rule for a dynamic definition. The fields returned in the result set of the query are all accessible in the template using standard bookmark syntax, for example, for qDrawings:Alias, the following can be used: RR_qDrawings_Title, RRFT_qDrawings_ReferenceDate, etc. In the query, you can reference
- @pProject for the current Project ID;
- @pDocMasterKey for the current (template) document,
- @pDocTypeKey for the current (template) document type and
- @pUID for the current user identity.
(See KBA-01476 for details on Dynamic Aliases, including additional rules to modify the qAlias.)
Specifies (in the result value) additional query parameters for the qalias defined in the qalias:Alias rule. The result value accepts a semicolon-separated list. Note: it is better to use parameters that are automatically supplied by default and simply use TSQL logic to gather any additional criteria.
Specifies (in the result value) the number of seconds for running the dynamic query (as defined in the qalias:Alias rule) before SQL cancels the query.
Specifies (in the result value) the name of a role that the user must have to be allowed to use this query. Default is 0, meaning the query is available for all users.
Specifies (in the result value) the number of milliseconds to delay a save transaction after the data has been written but before it is committed. This rule only applies when the application is running in DEV mode (see Diag Tab) and the value is between 20 and 180,000.
These rules define dynamic queries for use by Microsoft Word Templates and/or ATC workflow scripts (see ATC: QUERY).
KBA-01613; Last updated: February 10, 2023 at 13:54 pm; green text = new
Keywords: settings for dynamic query, custom fields for word documents and for workflow