AX1392

GetFileGroupVariable function

Returns the value for a file group variable, given the variable name.

NOTE: You can use a data lookup to return the same information as a GetFileGroupVariable function. Whenever possible, it is recommended to use data lookup queries over Axiom functions for faster performance.

Syntax

GetFileGroupVariable("VariableName",FileGroupID)

(missing or bad snippet)

All non-numeric entries must be placed in double quotation marks, unless you are using cell references to reference the text held in another cell.

Remarks

  • When using this function within a file that belongs to a file group, you may see a small performance improvement if you include the file group ID in the function rather than omitting it to assume the current file group. In this case you should have a single designated cell that uses the GetFileGroupID function to return the ID for the current file group, and then reference that cell to get the ID.

  • GetFileGroupVariable is a non-volatile function.

Examples

=GetFileGroupVariable("FileGroupYear")

This example returns the value of the built-in FileGroupYear variable, for the current file group. For example: 2022.

=GetFileGroupVariable("BudgetData",Variables!$F$32)

This example returns the value of the user-defined BudgetData table variable, as defined in the file group properties of the current file group. For example: BGT2022. In this example the file group ID is being specified by pointing to a designated cell on the Variables sheet that contains a GetFileGroupID function.

=GetFileGroupVariable("BudgetData",83)

This example returns the value of the BudgetData table variable, for the file group with ID 83. In a report file, the file group ID must be specified because there is no current file group context. In most cases the ID would not be "hard-coded" in the function as shown here—instead it would be returned via the GetFileGroupID function or from a query to a system table such as Axiom.FileGroups.

=GetFileGroupVariable("SalaryEscalator")

This example returns the value of the user-defined SalaryEscalator variable, as defined in the file group properties of the current file group. For example: .02. If the variable is defined as numeric then the value will be returned as a number; otherwise it will be returned as a string.