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.
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. |
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)>>
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 |
---|---|
The results are displayed in the following table.
Name | Quarter 1 | Quarter 2 | Quarter 3 |
---|---|---|---|
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 26. Text Functions that Support the Current Keyword