Using workspaces to share field definitions

Concept Information

ACTIVATE command

An Analytics workspace is an Analytics project item that contains one or more field definitions that have been saved for reuse with other tables. When a workspace is activated, the fields within it are available to the current table. Workspaces let you maintain and reuse definitions of physical fields, computed fields, or filters (which can be selected from the Filters list in the Expression Builder). Reusing or sharing field definitions and filters ensures consistency, and reduces the repetitive work of defining fields and filters that are used in more than one table.

Workspaces can be shared between tables that contain fields of the same type, with the same names. For example, you might want to associate a workspace with successive tables of a given type, such as accounts receivable tables from different periods, or from different divisions of the same company.

If you are working with multiple-record-type files, you can store the definition for each record type in a separate workspace. You can select the appropriate workspace to process records of a specific type.

Create a workspace

  1. If you want to add field definitions from a particular Analytics table to the workspace, you need to open the table before you create the new workspace.
  2. Select File > New > Workspace.
  3. In the Add Fields to Workspace dialog box, complete any of the following tasks:

    Click Add All to add all fields to the workspace.

    Click an individual field in the Available Fields list and then click the right-arrow button to add it to the workspace.

    Ctrl+click multiple fields in the Available Fields list and then click the right-arrow button to add them to the workspace.

    Click Expr to open the Expression Builder and create an expression to add to the workspace.

    Note

    If you are adding computed fields that reference other computed fields, you need to add the computed fields that do not have dependencies (do not reference computed fields) before you add the computed fields that have dependencies.

  4. Click OK.
  5. In the Overview tab, right-click the workspace file and select Rename.
  6. Type a new name for the workspace and press Enter.

    Note

    Workspace names are limited to 64 alphanumeric characters. The name can include the underscore character ( _ ), but no other special characters, or any spaces. The name cannot start with a number.

Edit a workspace

You can edit a workspace by adding additional field definitions, or by modifying or deleting existing field definitions.

  1. If you want to add field definitions from a particular Analytics table to the workspace, you need to open the table before you start editing the workspace.
  2. Right-click the workspace file in the Overview tab in the Navigator and select Edit.
  3. Edit the entries in the Workspace Editor. You can modify or delete entries by editing the field definition text.
  4. Complete the following steps to add fields to the workspace:
    1. Click Add Fields to Workspace in the Workspace toolbar.
    2. In the Add Fields to Workspace dialog box, complete any of the following tasks:
      • Click Add All to add all fields to the workspace.
      • Click an individual field in the Available Fields list and then click the right-arrow button to add it to the workspace.
      • Ctrl+click multiple fields in the Available Fields list and then click the right-arrow button to add them to the workspace.
    3. Click OK.
  5. Right-click the workspace file in the Overview tab in the Navigator and select Close.
  6. Click Yes in the confirmation dialog box.

Activate a workspace

A workspace can be activated for use with any Analytics table, but you must ensure that any fields referenced in the workspace field definitions are available in the Analytics table. For example, if a workspace includes a computed field named Value that is defined using the expression sale_price * quantity, you must ensure that any table you use the workspace with includes both the sale_price and quantity fields.

If you activate a workspace that includes a field with the same name as one of the fields in the table, Analytics asks if you want to replace the field in the table. Click Yes to temporarily replace the field in the table with the workspace field until you close the table.

If you edit the table layout after you activate a workspace, or make a change that causes the application to automatically save the table layout, Analytics permanently adds the workspace fields to the table layout. Once the workspace fields are saved in the table layout, you can add the fields to the view.

  1. Open the table you want to use the workspace with.
  2. In the Overview tab of the Navigator, right-click the workspace and select Activate.

Add a workspace field definition to a table layout

By default, the fields in a workspace are only available for use with your Analytics table when the table is open and the workspace is activated. When the table is closed, the workspace is deactivated automatically, and the workspace fields are no longer available for use unless the workspace is reactivated. If you want the workspace fields to always be available when the table is open, you need to add them to the table layout. When you add the workspace fields to the table layout, you are copying the definitions from the workspace and creating fields in the table layout. This means that any future changes to these fields must be completed in the table layout, not in the workspace.

  1. Open the table you want to add the workspace field definitions to.
  2. In the Overview tab of the Navigator, right-click the workspace and select Activate.
  3. Select Edit > Table Layout.
  4. Double-click one of the fields listed to edit the properties of the field.
  5. Change the value in the Width text box by increasing the value by 1.
  6. Click Accept Entry .

    Saving the change forces Analytics to save the change made to the field definition and also saves the field definitions in the activated workspace in the table layout.

  7. Double-click the field you modified in steps 4 and 5 and restore the original value in the Width text box.
  8. Click Accept Entry  .
  9. Click Close  to exit the Table Layout dialog box.

Copy a workspace from another Analytics project

You can copy a workspace from one Analytics project to another, which allows you to reuse the physical or computed field definitions, or the filters, the workspace contains rather than creating them from scratch. In addition to saving labor, reusing any of these items, or sharing them with other Analytics users, ensures consistency. You can copy a single workspace, or multiple workspaces simultaneously.

If you want to import a workspace that exists as a separate file outside an Analytics project, see Import a workspace.

  1. Open the project that will contain the copied workspace or workspaces.
  2. In the Overview tab of the Navigator, right-click the Analytics project entry, or a project folder, and select Copy from another Project > Workspace.

    The Analytics project is the top-level folder in the treeview.

  3. In the Locate Project File dialog box, locate and select the Analytics project you want to copy the workspace or workspaces from and click Open.
  4. In the Import dialog box, complete any of the following tasks to add one or more workspaces to the To project_name list:

    Double-click a workspace.

    Ctrl+click multiple workspaces and then click the right-arrow button.

    Click Add All to add all the workspaces.

    You can remove workspaces from the To project_name list by double-clicking an individual workspace, by using Ctrl+click to select multiple workspaces and then clicking the left-arrow button, or by clicking Clear All.

  5. Click OK to copy the workspace or workspaces into the destination project.

    If a workspace with the same name already exists in the project, the copied workspace is given an incrementing numeric suffix.

Import a workspace

You can import a workspace that exists as a separate .wsp file outside an Analytics project, which allows you to reuse the physical or computed field definitions, or the filters, the workspace contains rather than creating them from scratch. In addition to saving labor, reusing any of these items, or sharing them with other Analytics users, ensures consistency. You can import only one workspace at a time.

If you want to import a workspace from another Analytics project, see Copy a workspace from another Analytics project.

  1. In the Overview tab of the Navigator, right-click the Analytics project entry, or a project folder, and select Import Project Item > Workspace.

    The Analytics project is the top-level folder in the treeview.

  2. In the Project dialog box, locate and select a workspace file (.wsp) and click Open.
  3. Click OK in the confirmation dialog box.

    The workspace is imported into the project. If a workspace with the same name already exists in the project, the imported workspace is given an incrementing numeric suffix.

Export a workspace

You can export a workspace as a separate .wsp file saved outside the Analytics project. A workspace exported as a separate file can later be imported into any Analytics project, which allows you to reuse the physical or computed field definitions, or the filters, the workspace contains rather than creating them from scratch. You can export only one workspace at a time.

  1. Right-click the workspace in the Overview tab of the Navigator and select Export Project Item.
  2. In the Save As dialog box, choose a location to save the workspace, rename the workspace if required, click Save, and click OK in the confirmation dialog box.

    The workspace is exported to the location you specified.

    Note

    Limit the workspace name to 64 alphanumeric characters, not including the .wsp extension, to ensure that the name is not truncated when the workspace is imported back into Analytics.

    The name can include the underscore character ( _ ), but do not use any other special characters, or any spaces, or start the name with a number. Special characters, spaces, and a leading number are all replaced by the underscore character when the workspace is imported.

Add or edit a workspace note

You can add a note to a workspace to record any details about the workspace that you want to keep for future reference, or document for other users. You can edit the content of a workspace note at any time.

You do not need to activate the workspace to add, edit, delete, or read the note.

  1. Right-click the workspace in the Overview tab in the Navigator.
  2. Select Properties.
  3. In the Workspace Properties dialog box, click the Notes tab.
  4. Enter a new note or edit the existing note.

    To delete the note, delete all the text.

  5. Click OK to close the dialog box and save your changes.