GetTemplateDisplayData

Returns various types of information for templates. The types of information returned correspond to the display columns in the Columns tab of the Filters And Sorting dialog box. The template information is returned as a multidimensional array, with one array dimension for each display column that you specify in the varalColumns argument.

Syntax

<IHsvJournalsEx>.GetTemplateDisplayData varalColumns, varlTemplateIDs, pvar2DvarData

Argument

Description

varalColumns

Long array (ByVal). Specifies the display columns for which template information will be returned. To create this array, use the HFMConstants type library constants listed in Template Column Display Constants.

varlTemplateIDs

Long array (ByVal). The ID numbers of the templates for which you want to return information.

pvar2DvarData

Variant array. Returns information for the templates and columns that match the criteria specified in the arguments. This is a multidimensional array, with one dimension for each column specified in the varalColumns argument; in each dimension, there is one element per template.

For details on the values returned in the array elements, see Template Column Return Values.

Example

The following example returns the labels, descriptions, and groups of templates that have labels beginning with “jStd” and that have balance types of either Balanced or Balanced By Entity. The IDs of these templates are returned by GetTemplateQueryDefinitionIDs; note that the templates are sorted by label in ascending order. The template IDs are then passed to GetTemplateDisplayData, and the template information returned is printed to Visual Basic’s Immediate window.

Dim laCols(2) As Long, vaDisplayData, laSort(0, 1) As Long
Dim vaFilter(31), vaTemplIDs
laCols(0) = COLUMN_TEMPLATELABEL
laCols(1) = COLUMN_TEMPLATEDESCRIPTION
laCols(2) = COLUMN_TEMPLATEGROUP
laSort(0, 0) = COLUMN_TEMPLATELABEL
laSort(0, 1) = 0
vaFilter(0) = "jStd%"
vaFilter(1) = Array(JBTF_BALANCED, JBTF_BALANCED_BY_ENTITY)
m_cIHsvJournalEx.GetTemplateQueryDefinitionIDs laCols, _ 
vaFilter, laSort, vaTemplIDs
m_cIHsvJournalEx.GetTemplateDisplayData laCols, vaTemplIDs, _ 
vaDisplayData
For i = LBound(vaTemplIDs) To UBound(vaTemplIDs)
  Debug.Print "Label: " & vaDisplayData(i, 0)
  Debug.Print "Description: " & vaDisplayData(i, 1)
  Debug.Print "Group: " & vaDisplayData(i, 2)
Next i