Variables in Dashboard Components

By - Updated April 9, 2019

Standard Variables in Kepion are compatible with Dashboard text and image components. As a result, you can create dynamic content using variable data. Since it’s also possible to automatically update this data through scripts, variables can add a lot of flexibility to the design process. In addition, Kepion comes with a set of predefined System Variables. Let’s take a closer look at both of these types below.

User-Defined Variables

To begin, imagine that you wanted to update the text in your Dashboard to dynamically display the current year:

To do this, first navigate to the Standard Variables pane in the MODELER tab and create a new Standard Variable. For this example, I created a variable called Current Year and set the value to 2019.

creating a variable

Once saved, you can reference this variable through your Dashboard text using the format:

Now in the Dashboard below, Deflator Percentage ${Current Year} will resolve to Deflator Percentage 2019 after clicking away from the text editor.

In addition, variables can also be used in this way when creating hyperlinks, both through text and images. This could be useful for directing traffic between developer and production environments.

url variable example

System Variables

Kepion also features System Variables which the Kepion Dashboard can utilize in the same way. However, these will always resolve to the system-defined term, even if overridden with a user-defined variable.

These variables are defined as:

  • ${user}: The currently logged in user
  • ${plan}: The name of the plan
  • ${submission}: The name of the submission
  • ${page}: The current dashboard page context
  • ${contributor-page}: The relative path to either the HTML5 or Silverlight version of Kepion.
  • ${contributor-page-no-splash}: The same as the above, but without the Kepion splash page.

Note: For more information on the contributor-page variables, check out this article.

To demonstrate the precedence of these variables over user-defined ones, let’s create a Standard Variable, as in the example above, and set the name to user and the value to Kepion Solution. If we then add it to our Dashboard, notice that the text will still resolve to the current logged-in user It would not display Kepion Solution.

System-defined variable example.