GetTemplateQueryDefinitionIDs

Returns IDs of one or more templates. You can return IDs of all templates or return only those IDs that meet the filtering criteria you specify.

Syntax

<IHsvJournalsEx>.GetTemplateQueryDefinitionIDs varalColumns, vararvFilters, var2DalColumnsSort, pvararlTemplateIDs

Argument

Description

varalColumns

Long array (ByVal). This array specifies the display columns. To create this array, use the HFMConstants type library constants listed in Template Column Display Constants.

vararvFilters

Variant (ByVal). Enables you to filter out templates:

  • To return all template IDs, pass an empty variable.

  • To filter out templates, pass this as a Variant array that consists of 32 elements.

When filtering templates, each array element corresponds to a type of filter. The available filters and their indexes in this 32-element array are described in Table 65, Template Filter Array Elements. Define only those elements that correspond to the desired filtering criteria; if you do not want to use a filter, leave the corresponding array element empty.

Note:

In this release only the first four elements and the sixth through eights elements of this array are supported; the remaining elements are reserved for future use.

var2DalColumnsSort

Long array (ByVal). Specifies the columns on which to sort and whether the sort order is ascending or descending. This is a two-dimensional array, where the first dimension specifies the sort columns and the second dimension specifies the sort order. Apply the following rules when defining this array:

  • The first dimension takes the HFMConstants type library constants listed in Template Column Display Constants.

  • The second dimension takes 0 to sort in ascending order, 1 in descending order.

For example, suppose you want to sort by label and then by group, with both sorts in ascending order. This array would be defined as follows:

(0, 0) = COLUMN_TEMPLATELABEL

(0, 1) = 0

(1, 0) = COLUMN_TEMPLATEGROUP

(1, 1) = 0

pvararlTemplateIDs

Variant array. Returns the ID numbers of the templates that match the criteria specified in the arguments. The array is returned as a Long subtype.

Template Filter Array Elements

The following table lists the index numbers, corresponding display columns, and descriptions of the supported elements in the array passed to the vararvFilters argument.

Note:

The array passed to the vararvFilters argument is a 32-element array. Indexes for this array that are not listed in the following table are reserved for future use.

Table 65. Template Filter Array Elements

Index

Display Column

Description

0

Label

A String containing the desired label. You can use the percentage sign ( % ) as a wildcard character.

1

Balance Type

An array of Longs containing the balance types to be applied. These balance types are represented by the HFMConstants type library constants listed in Balance Type Constants.

2

Group

A String containing the name of the desired journal group. You can use the percentage sign ( % ) as a wildcard character.

3

Description

A String containing the name of the desired description. You can use the percentage sign ( % ) as a wildcard character.

5

Type

An array of Longs containing the template types to be applied. These journal types are represented by the HFMConstants type library constants listed in Template Type Constants.

6

Entity

The member ID (Long) of the entity by which to filter.

7

Parent

The member ID (Long) of the parent entity by which to filter.

Example

GetTemplateQueryDefinitionIDs is used in the Example for GetTemplateDisplayData.