AX1391

GetFileGroupProperty function

Returns information about a file group, such as the file group name or the current plan code.

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

Syntax

GetFileGroupProperty("CodeName", FileGroupID)

Parameter Description

CodeName

Use one of the following codes to specify the information you want to return about the file group:

  • Description: Returns the file group description.
  • DriversPath: Returns the path to the Drivers folder for the file group.
  • FileGroupName: Returns the file group name.
  • FileGroupDisplayName: Returns the display name of the file group.
  • FileGroupTabPrefix: Returns the tab prefix of the file group.
  • ProcessDefinitionID: Returns the ID of the process definition associated with the file group. Only applies if a process definition is specified as the Plan File Process for the file group. Returns blank otherwise.
  • PlanFile: Returns the plan code for the current plan file. This keyword can only be used within a file group. When used in a file that is not a plan file (such as a template), the file name is returned.
  • ScenarioName: Returns the scenario name when the file group is a scenario (returns blank otherwise).
  • UtilitiesPath: Returns the path to the Utilities folder for the file group.
  • TemplateName: Returns the name of the template used to create the current plan file. Only applies to plan files.

FileGroupID

Optional. The database ID of the file group.

  • If you are using the function within a file that belongs to a file group (template, driver, etc.), then you can omit the ID and the current file group is assumed.
  • If you are using the function outside of a file group (such as in a report file), then you must specify a file group ID. The function GetFileGroupID can be used to return the file group ID as necessary.

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.

  • GetFileGroupProperty is a non-volatile function.

Examples

=GetFileGroupProperty("FileGroupName")

This example returns the name of the current file group, assuming the function is used within a file that belongs to a file group. For example: Budget 2020.

=GetFileGroupProperty("PlanFile",Variables!$F$20)

This example returns the plan code for the current plan file. For example: 100. 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.

=GetFileGroupProperty("ScenarioName",83)

This example returns the scenario name of the file group with ID 83. For example: V1. 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.

=GetFileGroupProperty("UtilitiesPath")

This example returns the path to the Utilities folder for the current file group. For example: \Axiom\SystemFolderName_FileGroups\Capital Requests\SystemFolderName_Utilities. This could be used to build up dynamic paths to certain driver files, so that the paths would automatically update when the file group is cloned.