Use Dynamic Content (Variables)
You can define variables from data in Excel and text in Word documents that you have moved to a workspace as well as in reports, and reference the variables across documents and reports. Variables simplify the process of periodically updating the recurrent information that is often found in multiple reports. Instead of editing this information throughout multiple reports, and then having to update it repeatedly, you can use a variable to represent the information. Variables ensure a single source of truth—when the source changes, all linked instances update automatically, eliminating manual copy-paste errors.
Note: A user with different license type has different accesses to the Variable feature of the JP DM add-in. See User Permissions for more information.
Create Variables
- Open the Excel or Word document or report from the Disclosure Management website.
- Select what you want to use as a variable. In an Excel document, you can select content in a cell or in a range of cells, or a chart or picture; in a Word document, you can select any text.
- On the ribbon, select the JP DM tab and click Create Variable, or right-click in your selection and select JP DM > Create Variable.
- Type the email address of your insightsoftware account in the Login window if it prompts and click Continue.
-
JP DM displays the Create Variable panel, showing the file name of the current document in the Source file field.
- When creating variable in Word, the Source Text field is available, which displays the text you have selected as the variable source.
- In the Variable name field, specify the name of the variable. JP DM provides default name for the variable based on your selection. For example, when you create variable in Excel, JP DM names the variable based on the sheet name and cell range of the selected content; when creating variable in Word, JP DM applies the first three words in the text you selected as the default name.
-
JP DM automatically identifies the variable type according to your selection, which can be:
- Table when you select more than two cells in Excel
- Cross-Reference when you select one cell in Excel or text in Word
- Chart when you select a chart in Excel
- Picture when you select a picture in Excel
- From the Variable scope drop-down list, select whether the variable is accessible globally, limited to specific workspaces, or restricted to individual reports. When you select Document, it means the variable scope follows that of the document specified when the document was moved to a workspace.
- In the Description box, type up to 512 characters to describe the variable if you want.
- To add a label for the variable, click in the Labels field, type the label and click Create label in the drop-down list or select an existing label from the list. You can add as many labels to the variable as you need. To remove a label, click x in the label.
- Click Create.
- In the prompt message box, click Yes.
- When the variable is created successfully, JP DM displays the Variables panel, showing the variables you have created in the document. You can manage the variable as you need.
When a data query is scoped to a workspace, it is still possible to create a variable from that query at a broader scope. This may result in the variable appearing in unintended contexts. Verify variable scope settings after creation.
Insert Variables
- Open the document or report from the Disclosure Management website.
- Put the mouse pointer where you want to add the variable.
- On the ribbon, go to the JP DM tab and click Insert Variable, or right-click in the document and select JP DM > Insert Variable. JP DM displays the Insert Variable panel, showing the variables you can use.
- Select the variable you want. You can filter and sort the variable list to easily locate the variable you need.
- From the Show drop-down list, select to displays all available variables or the variables you have added to your favorite list.
-
To sort the variable, click the Sort icon
and select the sort order, in alphabetical order, by creation date, or by last used time.
- To search for variable names containing specific text, type the text in the Search box. You can also filter the variables by variable properties such as name, type, and scope to narrow down the search result.
- Before inserting a variable, you can click the ellipsis at its top right corner and select Edit variable to modify the variable if necessary.
- If you need to reference a variable frequently and want to have quick access to it, you can click the ellipsis of the variable and select Add to favorites to add the variable to your favorite variable list. To remove a variable from the favorite list, click the ellipsis and select Remove from favorites.
- Click the Insert button of the variable. When inserting a table or chart variable in Word, you can choose to insert it either as a table/chart or as a static image. A table/chart variable inserted as an image cannot be updated from the source.
- When inserting variables in a Word document or report, you can also click the ellipsis of a variable and select Copy variable to copy the variable to the clipboard. To paste the variable, right-click in the document where you want to add the variable and select JP DM > Paste Variable, or put the mouse pointer in the desired location in the document and click Paste Variable in the JP DM tab on the ribbon.
Due to current limitations in the Microsoft Office extensibility APIs for PowerPoint, variables cannot be inserted at the exact cursor position.
Manage Variables
- Open the document or report from the Disclosure Management website.
- Click Show Variables in the JP DM tab on the ribbon. JP DM displays a variable list in the Variables panel.
- From the Show drop-down list, select in which view you want to display the variables.
- Sources - Available to Excel document only. Select it to display the variables you have created in the document.
- All Instances - Displays all instances of the variables used in the document.
- Aggregated - Displays the first instance of each variable used in the document.
- Scroll the list to view the variables.
When you select a variable in the list,
- In a Word document or report, JP DM automatically navigates the document to the page containing the variable and highlights the variable in the content.
Tip: When you select a variable in a Word document or report, JP DM also scrolls the variable list to select the variable in the list.
- In an Excel document, JP DM automatically selects the content from which the variable is created in the corresponding sheet.
- In a Word document or report, JP DM automatically navigates the document to the page containing the variable and highlights the variable in the content.
- You can also sort and filter the variable list if you want.
- For each variable, you can click the ellipsis at its top right corner to work with the variable. Based on the document type, variable type, and how you show the variable list, you can perform all or some of the following operations:
- Copy variable - Copies the variable to the clipboard. To paste the variable, right-click in the document where you want to add the variable and select JP DM > Paste variable, or put the mouse pointer in the desired location in the document and click Paste Variable in the JP DM tab on the ribbon.
-
Edit variable - Modifies the name, description, and labels of the variable. When you click this option, if the variable is defined in another Excel document, JP DM will prompt you to open the source Excel. You can change the name, description, and labels of the variable in the Edit Variable panel. Click Update when you finish editing the variable, or click Delete if you want to remove the variable.
Note: When you delete a variable, you remove it from the source Excel only. JP DM retains instances of the variable in the destination documents. You will need to review and manually clean up orphaned instances after deleting a source variable.
-
View variable instances - Views all instances of the variable used in the document. When you click this option, JP DM displays the current variable with all its instances. For a document, JP DM displays the name of the variable for each instance; for a report, JP DM shows the report section each variable instance is used in. You can select an instance to locate it in the document or report.
You can also:
- Switch to the Labels tab to edit labels for the current variable.
- For a Word document or report, set the variable instances from Editing to To Review when they are ready for review, or use the Approve all instances or Reject all instances ellipsis menu option to approve or reject all the instances of the variable.
- For a table variable in a Word document or report, click the ellipsis and select Format & Style (all instances) to apply a style you have saved from one instance of the table variable to all the current instances or select Clear formatting (all instances) to remove the formatting of all instances and restore the formatting from the source Excel.
- For a table variable in a Word document or report, click the ellipsis of each instance and select the corresponding option to edit the format and style of the instance.
- Delete variable instance - Removes the current instance of the variable from the document.
-
Format & Style - Applies a style you have saved for the same table variable on other instances of the variable. Selecting None clears the customized formatting on the table variable instance and restores the formatting from the source Excel.
-
Save formatting - Saves the formatting you have made to a table variable instance. When you change the table properties for a table variable instance in a Word document or report, you can save the properties as a style so you can apply the same style to other instances of the table variable.
- Clear formatting - Clears the formatting you have made to a table variable instance and restores the formatting from the source Excel.
- You can view additional information about each variable/variable instance via the buttons and icons in it. JP DM displays different buttons/icons based on the document type and how you display the variable list.
-
- Available to an Excel document. It indicates how many documents a variable has been used in.
-
- Indicates how many times a variable is referenced in the document. You can click the button to view all the instances.
-
- Indicates how many times a variable is referenced in the document.
-
- Available to a Word document or report. It indicates the status of a variable instance. When a variable instance is ready for review, you can click the button and select To Review to start the review process for it.
-
- Available to a Word document or report. It indicates the review status for the instances of a variable.
-
Refresh Variables
When you open a document or report from a workspace, JP DM automatically updates the dynamic content obtained from variables, if there are any changes in the source Excel. You can also use the Refresh Variables command in the JP DM tab on the ribbon to refresh the variables from the source Excel at any time, to ensure the data is always up to date. To refresh the data queries on which the variables are based and the variables at the same time, use the Refresh External Data command.
- Referenced pivot table content inserted as an image may show zeros after refresh. You can refresh the source Excel first as a workaround.
- Due to a known limitation in the Microsoft Office rendering engine, combination charts (Histogram, Pareto, Box & Whisker) may render differently than expected.
Lock/Unlock Variables
When working with a Word document or report, if you need to lock data of the variables you have linked in the document from being updated from the source Excel, you can click JP DM > Lock Refresh on the ribbon. To release data lock of the variables, click Unlock Refresh.
Variable Scope and Sharing Notes
When sharing variables or content across workspaces and reports, access permissions are enforced at the workspace level. In certain configurations, users may be able to view shared variable content before workspace-level access restrictions are fully applied. We recommend reviewing workspace membership to ensure it aligns with your organization's content access policies.