AX2153

About calc method libraries

Calc method libraries store sets of predefined calculation methods. Each calc method is a set of formatting and formulas used to calculate a plan value. User inputs may be incorporated.

Calc method libraries can be used in the following ways:

  • In Axiom queries, to dynamically build out rows of data. Each record to be inserted into the data range is assigned a specific calc method.
  • By end users, to add new rows to plan files, or to change the calculations used on existing rows.

Calc method libraries are available in the following file group files: templates, plan files, drivers, and utilities. When working in other Axiom files, such as reports, you can use in-sheet calc methods. In-sheet calc methods apply to the current sheet only, are not saved back to a central library, and can only be used in conjunction with Axiom queries.

What is a calc method?

Simply stated, a calc method is a row (or collection of rows) in a spreadsheet that has been saved back to a central location for re-use. The calc method can contain formatting, formulas, and values, but should be constructed so that it is adaptable for use in any relevant plan file.

When you save a new calc method, Axiom takes a copy of the selected row or rows and stores it in the associated calc method library file, along with a few settings relating to the calc method. When the calc method is used by an Axiom query, or a user chooses to use that calc method in a plan file, Axiom retrieves it from the library and inserts it into the sheet.

The contents of a calc method should be constructed so that it is applicable to all plan files where it may be used, and so that calc method change operations have the desired results. When a calc method is replaced with another calc method, Axiom compares the contents of the new calc method to the original calc method, and chooses what to overwrite depending on the type of contents. For more information, see Change calc method rules.

Each calc method can have a number of defined variables. When a user selects to insert or change a calc method, the user is prompted to define or select values for the variables, such as selecting an account number. When the calc method is inserted into the sheet, the selected variable values are placed into the designated cells of the calc method. For more information, see Defining calc method variables within the calc method properties (legacy approach).

Example plan file using calc methods

Calc method libraries and sheet names

Calc method libraries are stored based on sheet names, on a per file group basis. For example if you have a sheet in your template named Budget, then there is a calc method library named Budget, and all plan files in that file group that contain a Budget sheet can access those calc methods. If you have a second template in the same file group that also has a Budget sheet, that sheet uses the same Budget calc method library. Therefore, all plan sheets with the same name must also have the same column structure. If the sheet uses a different column structure, you must give it a different name.

Users and calc methods

End users can use calc methods from a library to insert new rows or change existing rows in a plan sheet. Typically templates are constructed so that there are certain areas designed to accommodate the insertion of new rows. You can define custom insertion points to reinforce this structure and make it easy for users to insert new rows in the appropriate places, and you can use insertion controls to control exactly where calc methods can be inserted. See Setting up calc method controls for a sheet.

Axiom queries and calc methods

Calc method libraries can be used in Axiom queries to build out rows of data as they are inserted into the sheet. When using this approach, each record to be inserted into the sheet must be assigned a calc method from the library. This can be done in the following ways:

  • An assignment column can be created in the appropriate reference table, such as the ACCT table. Each account can be assigned a specific calc method. This column is then referenced in the Axiom query settings.
  • Calc method assignments can be defined in a sheet within the file. This sheet and the applicable columns are then referenced in the Axiom query settings.
  • A default calc method assignment can be defined in the Axiom query settings.

These three options can be used alone or together. For example, if all three options are defined, then Axiom first checks the sheet for an assignment, then the table column, and lastly uses the default assignment.

For more information on using calc methods in Axiom queries, see Calc methods and Axiom queries.