AdvancedSearchQueries method: Session class
Syntax
AdvancedSearchQueries(GetFavorites, QueryName, QueryNameOp, Descr, DescrOp, FolderName, FolderNameOp, RecordName, RecordNameOp, FieldName, FieldNameOp, TreeName, TreeNameOp, QueryType, OwnerType, CaseSensitive)
Description
Use the AdvancedSearchQueries method to do more complex searches for queries.
Parameters
| Parameter | Description |
|---|---|
|
GetFavorites |
Specify whether to return only queries marked as favorites. This parameter takes a Boolean value: true if you only want favorite queries returned, false otherwise. If you specify true for this parameter, all other parameters are ignored. |
|
QueryName |
Specify the name of the query you want returned, as a string. Use this parameter with the QueryNameOp parameter. |
|
QueryNameOp |
Specify the operator to be used with the QueryName parameter. The valid values for this parameter are found in the Using Search Operators section, above. |
|
Descr |
Specify the description you want returned, as a string. Use this parameter with the DescrOp parameter. |
|
DescrOp |
Specify the operator to be used with the Descr parameter. The valid values for this parameter are found in the Using Search Operators section, above. |
|
FolderName |
Specify the name of the folder of the query or queries you want returned, as a string. Use this parameter with the FolderNameOp parameter. |
|
FolderNameOp |
Specify the operator to be used with the FolderName parameter. The valid values for this parameter are found in the Using Search Operators section, above. |
|
RecordName |
Specify the name of the record used with the query (queries) you want returned, as a string. Use this parameter with the RecordNameOp parameter. |
|
RecordNameOp |
Specify the operator to be used with the RecordName parameter. The valid values for this parameter are found in the Using Search Operators section, above. |
|
FieldName |
Specify the name of the field associated with the query (queries) you want returned, as a string. Use this parameter with the FieldNameOp parameter. |
|
FieldNameOp |
Specify the operator to be used with the FieldName parameter. The valid values for this parameter are found in the Using Search Operators section, above. |
|
TreeName |
Specify the name of the tree associated with the query (queries) you want returned, as a string. Use this parameter with the TreeNameOp parameter. |
|
TreeNameOp |
Specify the operator to be used with the TreeName parameter. The valid values for this parameter are found in the Using Search Operators section, above. |
|
QueryType |
Specify the type of query, as a string. See below. |
|
OwnerType |
Specify the type of owner, whether the query is public or private. |
|
CaseSensitive |
This parameter has not yet been implemented. |
The values for QueryType can be as follows:
| Numeric Value | Constant Value | Description |
|---|---|---|
|
1 |
%Query_Query |
Find queries of the type Query. |
|
5 |
%Query_DBAgent |
Find queries of the type Process. |
|
4 |
%Query_Role |
Find queries of the type Role |
|
7 |
%Query_Archive |
Find queries of the type Archive. |
Returns
A reference to a Query collection containing zero or more queries.
Note:
If the result set contains more than 300 rows, only the first 300 rows are returned.
Using Search Operators
All of the parameters for this method work in pairs, with the value in the first of the paired parameters further distinguished by the search operator used in the second parameter. For example, the value specified in FieldName is paired with the value specified in FieldNameOp.
All of the search operator parameters use the following values. Note that the format of the value of the first parameter is sometimes affected by the value of the search operator parameter.
| Constant | Description |
|---|---|
|
%Query_AdvSrchBegins |
Name begins with the values specified. |
|
%Query_AdvSrchContains |
Name contains the value specified. |
|
%Query_AdvSrchEquals |
Name equals the value specified. |
|
%Query_AdvSrchNotEquals |
The name does not equal the value specified. |
|
%Query_AdvSrchLessThan |
The name is less than the value specified. |
|
%Query_AdvSrchLessEquals |
The name is less than or equal to the value specified. |
|
%Query_AdvSrchGreaterThan |
The name is greater than the value specified. |
|
%Query_AdvSrchGreaterEquals |
The name is greater than or equal to the value specified. |
|
%Query_AdvSrchBetween |
The name is between two values specified by a comma. Do not use quotation marks. For example, ACCT1,ACCT9. |
|
%Query_AdvSrchIn |
The name is in the list specified list. The values are separated with commas. Do not use quotation marks. For example, ACCT1, ACCT2, ACCT3 |