Pass Parameters to the HTML Page for Embedded Oracle Analytics Content

You can pass parameter values to the HTML page where you're embedding Oracle Analytics content. The parameter values that you pass can be utilized within query expressions and various parts of the product.

The parameters payload is a Javascript Object containing paired attributes of parameter names and values.

In this example, all instances of project refer to workbook. Rendering a project while applying parameters look like this:

<oracle-dv project-path="{{projectPath}}" active-page="canvas" active-tab-id="3" parameters="{{parameters}}" 
project-options='{"bDisableMobileLayout":false, "bShowFilterBar":false}'>
</oracle-dv>

<script>
requirejs(['knockout', 'ojs/ojcore', 'ojs/ojknockout', 'ojs/ojcomposite', 'jet-composites/oracle-dv/loader'], function(ko) {

   function MyProject() {
      var self = this;
      self.projectPath = ko.observable("/users/weblogic/EmbeddingStory");
      self.parameters = ko.observable({
         "p1n": "Office",
         "p1v": "Bristol Office",
         "p2n": "Year",
         "p2v": [2023, 2022]
      });
    }
    ko.applyBindings(MyProject);
});
</script>
Supported attributes — Each parameter object within the parameters payload must contain the following attributes:
  • p <number> n: (Required) Specifies the parameter's name as defined in the workbook. For example, "Office" or "Year".

  • p <number> v: (Required) Specifies the parameter value that you want to pass. For example "Bluebell Office" or "10" or [2023, 2022].

  • p <number> d: (Optional) Use with parameters with double columns. Specifies the parameter's display value corresponding to p <number> v. For example, "My Office".