UTILITY Class Methods
In this section, the UTILITY class methods are presented in alphabetical order.
Syntax
CheckQryForTreePrompt(QryName, scope)
Description
Use this method to checks if a specific query uses tree prompts.
Important! Connected query does not support queries with tree prompts.
Parameters
Field or Control |
Definition |
---|---|
QryName |
Specifies the query name as a string. |
scope |
Specifies the query scope as a string. If a valid value is not specified, CheckQryForTreePrompt searches to determine the scope. The values are:
|
Returns
The empty string if the query does not use tree prompts; otherwise, an error string.
Syntax
CheckQrySecurity(QryName, IsPublicObject)
Description
Use this method to check user access security for a single query. CheckQrySecurity performs the following checks:
-
Whether the query is public for public connected queries (IsPublicObject is True).
-
Whether the query is disabled.
-
Whether the query has tree prompts by invoking CheckQryForTreePrompt.
-
Whether there are query prompt security violations.
Parameters
Field or Control |
Definition |
---|---|
QryName |
Specifies the query name as a string. |
IsPublicObject |
Specifies a Boolean value indicating whether the connected query is public. |
Returns
A Boolean value: True if the security validation was successful, False otherwise.
Syntax
GetQueryScopeByName(QryName)
Description
Use this method to check whether the specified query has a public or private scope.
Parameters
Field or Control |
Definition |
---|---|
QryName |
Specifies the query name as a string. |
Returns
A number:
-
0 — Private query.
-
1 — Public query.
-
2 — Query not found.
Syntax
ValidateObjectID(ID)
Description
Use this method to check whether the specified ID (connected query ID or run control ID) contains special characters. Valid characters for IDs include A-Z, 0–9, and _.
Parameters
Field or Control |
Definition |
---|---|
ID |
Specifies the ID to be validated as a string. |
Returns
An empty string if the validation was successful; otherwise, an error string.