Using modules

Note

Modules are like a one level deep directory structure, you can create any number of modules within a project but you cannot create modules within modules.

Using modules have two important aspects:

  1. You create and manage modules and formula assets within them when you are developing your model.
  2. Modules define a runtime context for evaluating your model, that is whenever you evaluate your model, you are doing this with either an explicit or implicit list of modules. This list of modules provide visibility (scope) for expressions used during the evaluation.

Creating modules

../_images/create-module.png
  1. To create a new module open your project (click into it), click on the plus button on top of the left sidebar and choose Module.
  2. In the dialog that appears type a name.
  3. Then an empty module is created and opened on a new tab in the right pane.

Moving Formulas and Tables

In order to move a Formula or Table (asset) from one module to another, do the following:

  1. Navigate to the Module containing the assets you want to move
  2. Select the assets you want to move (ctrl+click)
../_images/move-to-module.png
  1. Click the files button (next to the plus sign) the top of the right pane and choose Move selected.
  2. Finally select the target module or workbook, where the selected formulas and tables will be moved.
../_images/move-to-module-target.png

Specify Module imports

When your model is structured into modules you will need to properly specify module imports (module lists). While working with the system it will ask you for module lists when required.

However supposing that you just refactored your model into modules do not forget to check the following:

  • Workbooks:
    • open the project
    • select the workbook to check the imported list of modules
  • Test suites:
    • navigate to Tests
    • open the Test Suite and
    • check the imported list of modules
  • API calculation groups:
    • navigate to API
    • open the Calculation Groups and
    • check the imported modules
  • Builds:
    • navigate to Deployment
    • select the Build Configuration from the dropdown list
    • click Options
    • check the imported modules
    • click Build to do the build