Using the Current/Cur Keyword in a Text Function

You can use the current keyword with certain text functions to make the formulas more dynamic, more useful, and less redundant. The current keyword can replace required parameters in text functions. Hard-coded parameters produce the same results, whereas the current keyword can produce dynamic values. For example, when you use current for the Page parameter in a multiple page grid, it produces the value for each page.

You can use any form of the current keyword; current, or cur. Current keywords are not case-sensitive.

Note:

The current keyword is supported in a text object only when using the following text functions: MemberName, MemberAlias, and MemberDescription, where current specifies the Page dimension parameter. However, the Grid name, Row, and Column must be defined, where applicable, and cannot use the current keyword.

Example 1:

In the GetCell function, many of the parameters are or may be relative to the current cell in which the function is entered. Therefore, the current keyword can be applied to this function. The GetCell function uses the following syntax:

<<GetCell ("GridName", Row, Column, Page)>>

In the following example, the hard-coded parameters for GetCell return the same cell value of Grid 1, cell 1A, page 1 across multiple pages:

<<GetCell ("Grid1", 1, A, 1)>>

The next example uses the current keyword with the GetCell function. The cell where the function is entered displays different values for each page. Notice that the current keyword is also applied to the grid name. If the grid name is changed, the text formula is still correct.

<<GetCell ("current", 1, current, current)>>

Example 2

When you use the current keyword in a cell that expands, the results are relative to the expanded cell.

The following example uses GetCell functions in an expanded cell (Column A expands to columns Qtr1, Qtr2, Qtr3 and row 1 expands to rows East and West). Text Row 1 uses the current keyword for the Column parameter; Text Row 2 uses a hard-coded value for the Column parameter.

Name Description
.

Qtr1, Qtr2, Qtr3

East, West

#

Text Row 1

<<GetCell(cur, 1, cur, cur)>>

Text Row 2

<<GetCell(current, 1, A, 1)>>

The results are displayed in the following table.

Name Quarter 1 Quarter 2 Quarter 3

East

5,120

4,502

7,304

West

3,405

2,300

4,462

Text Row 1

5,120

4,502

7,304

Text Row 2

5,120

5,120

5,120

  • Text Row 1 uses the current keyword for the Column parameter, which results in the update of the current column of each expanded cell (Qtr1, Qtr2, Qtr3). Also, because the current keyword is used for the Page parameter, the values in Text Row 1 update each page relative to the current page of the grid.

  • Text Row 2 uses a hard-coded value for the Column parameter (A), which results in the same value of 5,120 for all quarters. A hard coded reference to a Column parameter returns the same top left value of the column and row.

Table -11 Text Functions that Support the Current Keyword

Text Function Example
<<DataSource("GridName.Axis[ID]",InfoType)>>

Parameters where applicable:

  • GridName: supported in all cells

  • InfoType: not applicable

<<DataSource(current, "App")>>

Note:

The current grid name is used.

<<GetCell("GridName",Row,Col,Page)>>

Parameters where applicable:

  • GridName: supported in all cells

  • Row: supported in all cells

  • Col: supported in all cells

  • Page: supported in all cells

<<GetCell(cur, 1, cur, current)>>
<<GetCell(cur, 1(3), cur, current)>>

Note:

The value from the third (expanded) row of row 1 is shown.

<<GetCell(cur, cur, A, current)>>
<<GetCell(cur, cur, A(B), current)>>

Note:

The value from the second (expanded) column of column A would be shown.

Use the following in a data row or column heading:

<<MemberName("DimName")>>

Use the following in a non-data row or column heading:

<<MemberName("GridName",Row/Col/Page,"DimName")>>

Use the following parameter where applicable:

DimName: Heading cells only

<<MemberName(current)>>
<<MemberName("current", Row/Col/Page, "current")>>

Note:

Returns the name of the member of the data row, column, or page that corresponds to the dimension where the heading cell is located. This can be used with the <<MemberDimension>> function to create custom headings for a grid.

<<CalcStatus("GridName",Row,Col,Page)>>

Note:

The parameters allowing the current keyword are highlighted in bold.

<<CellText("GridName", Row, Column, Page)>>
<<CellText("GridName", Row, Column, Page, MemberOverride)>>
<<GridDimension("GridName","Axis",index)>>

Note:

The parameters allowing the current keyword are highlighted in bold.

<<MemberAlias("DimName")>>
<<MemberAlias("GridName", "DimName")>> <<MemberAlias("GridName", Row|Col|Page, "DimName")>>
<<MemberDesc("DimName")>>
<<MemberDesc("GridName", "DimName")>>
<<MemberDesc("GridName", Row|Col|Page, "DimName")>>
<<MemberName("DimName")>>
<<MemberName("GridName", "DimName")>>
<<MemberName("GridName", Row|Col|Page, "DimName")>>
<<MemberQualifiedName("DimName")>>
<<MemberQualifiedName("GridName", "DimName")>>
<<MemberQualifiedName("GridName", Row|Col|Page, "DimName")>>
<<MemberProperty(DimensionName, Property)>> 
<<MemberProperty("GridName", DimensionName, Property)>> 
<<MemberProperty("GridName", Row|Col|Page, DimensionName, Property)>>
<<ProcessManagementStatus("GridName",Row,Column,Page)>>

Note:

The parameters allowing the current keyword are highlighted in bold.

 
<<ListOfCellDocuments("GridName",FileName)>>

Note:

The parameters allowing the current keyword are highlighted in bold.

 
<<GridDimension("GridName","Axis",Index)>>

Parameters, where applicable:

  • GridName: supported in all cells

  • Axis: Heading cells only

  • Index: Heading cells only

<<GridDimension(cur,"Page",1)>>
<<GridDimension(cur,cur,cur)>>

Note:

The dimension name corresponding to the heading cell is shown.

<<GetHeading("GridName",Page,Ref,Offset)>>
<<GetHeading("GridName",Page,Ref,"Delim")>>

Parameters where applicable:

  • GridName: supported in all cells

  • Page: supported in all cells

  • Ref: supported for in all cells, but should not be used in heading cells*

  • Offset: Heading cells only

  • Delim: not applicable

<<GetHeading(cur, cur, A, " - ")>>
<<GetHeading(cur, cur, 1, " - ")>>

Note:

In the above examples, all headings in column A and row 1 are shown for the current page.

<<GetHeading(cur, cur, A, cur)>>

Note:

The heading in column A is shown for the dimension that corresponds to where the heading cell with the formula is located.

<<GetHeading(cur, cur, cur, " - ")>>

Note:

If used within a row text cell, the result is all of the headings in the current column separated by a " - ". This allows users to repeat column headings after a manual page break.

*Use of the current keyword for the parameter "reference " is limited. The current keyword cannot be used in the GetHeading function when it is entered as a "custom heading" in a row or column because circular reference is created. You can use the current keyword as the third parameter within a cell that is part of a text row or column which is not in the heading area of the grid. For example, if you add the following formula in cell A3 where row 3 is a text row: <<GetHeading(cur,cur,cur,1)>>, the result is the first heading of column A. You can use the GetHeading function within a heading cell. However, the reference parameter should not use the current keyword. For example, when you enter in the heading cell of column B <<GetHeading(cur, cur, A, cur)>>, the column A heading is returned.