AX2197

File group variables

Each file group can have a set of defined variables to be referenced in file group components such as templates, drivers, and utilities. These variables can be used for any purpose, but it is recommended that they be used for some of the key properties of the file group, such as:

  • The target tables for saving data, including driver tables
  • The source tables for actuals and other supporting data
  • The picklist tables used by the file group
  • Certain key assumptions to be used for scenario planning

The purpose of file group variables is to avoid "hard-coding" these values within file group files, so that when the file group is cloned these values are not also inadvertently copied. Variables are also used to enable rapid scenario planning for a file group. Basically, if there is an essential property that you would want to change when cloning a file group or creating a scenario, that property should be set up as a file group variable.

For example, imagine that you define the target table for saving plan data within a driver file, so that the template and the resulting plan files reference this value. You then clone the file group to prepare for another year of planning. If you forget to update this value in the drivers of the new file group, then that file group will start saving data to the wrong table. On the other hand if you define this value as a file group variable, then when you clone the file group part of the cloning process will be to define new values for the file group variables, so the file group will start out with the correct values.

Once the variables and their values have been defined, you can reference them in file group components using the GetFileGroupVariable function. For example, if you have defined a variable named PlanTable that defines the target table for saving planning data, you can reference that value as follows:

=GetFileGroupVariable("PlanTable")

This would return BGT2020 if that is the current value defined for the variable in the file group settings.

File group variables can also be referenced in report files that are not associated with a file group, but in that case you must specify both the file group name and the variable name in the GetFileGroupVariable function (because there is no "current file group" for the report). File group aliases can be used in this case so that the function can dynamically point to different file groups as needed.