GetHeading

GetHeading is a text function that obtains text headings from a specified grid.

Syntax:

<<GetHeading("GridName", Page, Reference, Offset)>>

<<GetHeading("GridName", Page, Reference, "Delimiter")>>

Argument

Description

GridName

Name of a grid containing the heading to extract. The Current keyword can also be used.

Reference

View time reference of the heading to obtain. The Current keyword can also be used. See Row, Column, or Cell Reference Arguments.

Offset

Number that represents the dimension in a row or column heading with more than one dimension.

A numeric offset returns a single dimension heading. For example, in a row heading with three dimensions, you can specify (starting from left to right) “1” to return the first dimension, “2” to return the second dimension, and “3” to return the third dimension.

"Delimiter"

Quoted string that separates all headings from the row or column. If you provide a delimiter, you obtain all headings in the reference, separated by the provided delimiter.

Examples:

Use GetHeading to return the following column and row headings.

  
A(A)
A(B)
A(C)
  
Actual
Actual
Actual
  
Jan
Feb
Mar
1(1)
Georgia
112
67
73
1(2)
East
5,864
3,322
3,789
1(3)
Market
15,904
9,277
10,640

Use the syntax below to return the data in the previous sample grid:

GetHeading Example

Gets or Returns

GetHeading(“Grid1”,1,A,2)

Jan

GetHeading(“Grid1”,1,A(B),2)

Feb

GetHeading(“Grid1”,1,A(C),”-”)

Actual - Mar

GetHeading(“Grid1”,1,1,1)

Georgia

GetHeading(“Grid1”,1,1(2),1)

East

GetHeading(“Grid1”,1,1(2),2

<error> (it is an invalid reference)

GetHeading(“Grid1”,1,1(3),”-”)

Market

Note:

GetHeading only supports the Current keyword when used in a grid cell; not in a text box object, header, or footer. See Using the Current/Cur Keyword in a Text Function.