Skip to main content

Creating and embedding View modules

View modules are a package asset type that allow you to re-use configured View components across multiple Views within a Studio package. Instead of configuring each View from scratch, you can save time by centrally managing and then embedding a module to your View. And by editing a View module, all embedded instances of that module are automatically updated too.

In this example, the highlighted container (including a KPI list and two buttons) has been saved and embedded as a View module. This View module can then be efficiently added to any Views created within the same package, with the component configurations persisting across all Views :

Example of a view module used in a view.

When using View modules, you have the following options:

For a video overview showing how you create, edit, and embed View modules:

 

View modules can be created either from the package menu or directly in View editing mode, allowing you to conveniently save and then reuse your View content across your package.

You can create View modules in the following ways:

  • From the package menu: You can create a new View module from the package menu by clicking New Asset - View module.

    This option creates an empty View module, with the standard View editing features available for you to configure the module with (such as components, variables, settings etc).

    A screenshot showing how to create a view module in Studio.
  • From existing View content: When editing a View, you can create a View module by clicking Create Module on any component within your View, including containers of multiple components.

    While this option creates a View module from the existing content, you then have access to the standard View editing features to continue to configure the model.

    A screenshot showing how to create a view module from an existing view.
  • From the View settings sidebar: When editing a View where a View module already exists in the same package, you can create a View module by clicking View Modules and then New Module.

    This option also creates an empty View module, with the standard View editing features available for you to configure the module with (such as components, variables, settings etc).

    A screenshot showing how to create a view module from an existing view.

When creating a View module, you're prompted to enter or select the following:

  • Module name: This is an internal reference for the module and is not visible in published versions of the app.

  • Knowledge Model: Select a Knowledge Model from the same Studio package to use with the contents of this module.

    To learn more about Knowledge Models, see: Knowledge Models.

  • Module type: Select from View or Filter Bar (limited availability only).

A screenshot showing the create view module window.

This feature is currently available as a Private Preview only

During a Private Preview, only customers who have agreed to our Private Preview usage agreements can access this feature. Additionally, the features documented here are subject to change and / or cancellation, so they may not be available to all users in future.

For more information about our Private Preview releases, including the level of Support offered with them, see: Feature release types.

View modules can be parameterized using View variables, allowing you to change the context of the data based on where the View module is embedded.

The benefits of parameterizing View modules include:

  • Contextual reuse: Instead of adding a single customer ID, date range, or business unit into the View, you can pass them as View Variables. This means that one View Module can be used across multiple Views and adjusted based on the context.

  • Dynamic filtering without duplicating Views: View Variables allow you to apply filters or adjust logic at runtime, rather than duplicating the View and adjusting it as need. This keeps the Data Model lean and avoids redundant maintenance.

  • Performance optimization: Variables can reduce the volume of data fetched by applying constraints early. For example, setting a variable for a specific fiscal year can limit data loaded when opening the View.

  • Maintainability and governance: Having one central, parameterized View module means that business rules stay consistent across different use cases.

For more information about creating and using View variables, see: Enhanced View variables.

Example_View_module.png

Configuring a parameterized View Module

In a View Module, you can use View variables as parameters for properties that may change between instances/use cases.

In this example, we've created a View variable for material types and then mapped this to a module variable:

View_module_variable_example.png

To configure a parameterized View Module:

  1. In the main View: Create a string View variable, including setting a default value (Material1 in this example).

    Example_View_variable.png
  2. In the View Module: This variable is then mapped to the View Module using the configuration panel:

    module_variable_step_1.png
  3. You can then chose the variable mapping, selecting from the following:

    • Default variable: Select the default variable, ensuring the variable resets to its default each time the View is reopened.

      module_variable_step_2.png
    • Main View variable: Select one of your Main View’s View variables, with changes based on the user inputs.

      module_variable_step_3.png
    • Static value: Enter a static value via the Smart Input button next to the dropdown.

      module_variable_step_5.png
    • Static value and variable combination: Enter a combination of static value and variable via Smart Inputs

      module_variable_step_4.png

Use case example

You can create an object variable that stores all the data for a KPI. This variable can then be referenced in chart or table components within a View Module. By using variable mapping, you can replace the original object variable with a new one, allowing you to update all KPI metadata at once across any tables or charts where the KPI is used.

To set up this example:

  1. In the main View, create an object variable that stores all the data of a KPI, e.g.main_kpi = {“id“: “KPI_ID“, “name“:”Example KPI”, “format“:”.1f”}.

    use_case_example_-_1.png
  2. Use this KPI in a chart or table by referencing the object variable properties, e.g. in the PQL :

    KPI(${main_kpi.id})
    use_case_example_-_2.png
  3. Through the variable mapping in a View Module, you can now assign a new object variable and update all the KPI metadata in one go of this specific KPI that is used in the table or chart.

    use_case_example_-_3.png

Once created, View modules can be embedded in any Views in the same Studio package. When in Edit Mode, click View Modules and then drag and drop the module into the View:

A screenshot showing how to create a view module.

When the View module is edited, all embedded instances of that module are automatically updated too.

Once created, View modules can be edited and managed from the package menu.

A screenshot showing how to create a view module.

You have the following options for existing View modules:

  • Edit name: This allows you to rename the View module (but keep all existing configurations, settings and permissions).

  • Key: This key is a unique identifier to the View module and can be used within and outside the package to reference this specific asset.

  • Copy to: This wizard allows you to copy the View module (and all existing configurations, settings and permissions) to other teams or spaces that you hold permissions for. The original View module remains in the same location after it is copied.

  • Duplicate: This creates a copy of the View module (and all all existing configurations, settings and permissions) within the existing space. When duplicating a View module, you are prompted to enter a new package name and key.

  • Move to Trash: This moves the View module to your Trash area, allowing you to recover it back to its original location or delete it permanently.

    Items are held in the trash for 180 days from the point of deletion and then automatically deleted permanently with no recovery possible. To access your Trash, you need admin permissions to your Studio space.