Before you Begin
This tutorial shows you how to pass parameter values in a URL in Oracle Analytics.
Background
In Oracle Analytics, you can create a workbook with parameters bound to filters and then pass the parameter values to a workbook, a report, or an application. You might want to share the parameter values in the workbook with another user who has access to the workbook. You can pass parameters to yourself to provide a personalize view of a shared workbook.
What Do You Need?
- Access to Oracle Analytics
- Download sample_order_lines2023.xlsx to your computer
- Access to a text editor
Create a Dataset
In this section, you create a dataset using the sample_order_lines2023.xlsx file.
- Sign in to Oracle Analytics.
- On the Home page, click Create, and then click Dataset.
- In Create Dataset, click Drop data file here or click to browse.
- In Create Dataset Table from sample_order_lines2023.xlsx, click OK.
- Click Save
. In Save Dataset As, enter
sample_order_lines2023
, and then click OK.Description of the illustration sample_order_lines2023.png
Create a Workbook and Visualization
In this section, you create a workbook and visualization to pass parameter values in Oracle Analytics.
- Click Create Workbook.
- Close Auto Insights.
- In the Data
pane, hold down the Ctrl key and select Sales, Profit, Customer Segment, and City. Right-click and select Create Best Visualization.
Oracle Analytics generates a scatter visualization. The results of the generated visualization depend on how the data elements were selected. You can move the data elements within the grammar pane.
Description of the illustration scatter_vis.png - In the visualization, click Change Visualization Type
and select Horizontal Bar
.
- In the Grammar pane, select Sales and drag it to the Values (X-Axis) under Profit.
- In the Grammar pane, select Customer Segment and drag it to Category (Y-Axis) under City.
For this example, you want Sales and Profit to end up in the X-Axis after you move the data elements in the next steps, and Customer Segment and City in the Y-Axis.
The horizontal bar shows the negative profit values as lines pointing toward the left.
Description of the illustration horizontal_bar_vis.png - Click Save. In Save Workbook, enter a Name, and then click Save.
Bind the Parameters to Filters
In this section, you create filters using the City and Customer Segment data elements and bind parameters to the filters.
- In the Data pane, select City and drag it to Filters in the Grammar pane.
- In the Filter dialog, select:
- Albany
- Bangalore
- Barcelona
- Denver
- Hamburg
- Istanbul
- Click Bind to Parameter
. Click Create Parameter and then click outside of the dialog.
- In the Data pane, select Customer Segment and drag it to Filters in the Grammar pane to join the City data element.
- In the Customer Segment filter, select Corporate and Small Business. Click Bind to Parameter
. Click Create Parameter and then click outside of the dialog.
Description of the illustration city_segment_filter - Click Save. Click Go back
to close the workbook.
Copy and Modify the Workbook URL
In this section, you get the URL for the workbook's project.jsp page, and update it with the parameter values.
- On the Home page, hover over the workbook you created in the previous section, click Actions
, and then select Open in a New Tab.
- Copy the URL for the workbook and paste it in a text editor.
The URL must contain project.jsp in its path.
Description of the illustration url_projectjsp.png - In the text editor, define the select a different set of cities and customer segments to use as parameters and their values, similar to the following:
&p1n=Customer Segment
&p1v=Consumer,Home Office
&p2n=City
p2v=Glasgow,Houston,Johannesburg,Madrid,Hong Kong
- Copy the parameter variables to a single line and replace the commas and the spaces as follows:
- Replace commas with
%2C
- Replace spaces with
%20
Your encoded parameter values should look similar to:
&p1n=Customer%20Segment&p1v=Consumer%2CHome%20Office&p2n=City&p2v=Glasgow%2CHouston%2CJohannesburg%2CMadrid%2CHong%20Kong
- Replace commas with
- Append the parameter variables to the end of the path.
Your URL should look similar to:
Description of the illustration embedded_param_values.png - Copy the encoded URL and paste it in the address bar of a browser.
The horizontal bar visualization opens in the browser with the parameter values that you passed.
Description of the illustration updated_parameters
Learn More
Pass Parameter Values in an Oracle Analytics URL
F88332-02
June 2024
Copyright © 2024, Oracle and/or its affiliates.
Learn how to pass parameters values in a URL in Oracle Analytics.
This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software" or "commercial computer software documentation" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract. The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services. No other rights are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.