Skip to content

Latest commit

 

History

History

ex3

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Exercise 3 – Integrating Scripting

Objective: You should develop a basic understanding of scripting capabilities in SAP Analytics Cloud.

Estimated Time: 20 mins

Exercise Description: In Exercise 2, our customers were able to execute planning actions. As they were working through the planning dashboard, they realized that they weren't sure what rates were being used for the calculations in the Financial Plan and Employee Plan. We want to provide them a better understanding of what those rates are by utilizing scripting capabilities in SAP Analytics Cloud.

Key Features:

  • Understand how to add a popup in a dashboard
  • Utilize a button to increase user interaction in a popup
  • Write scripts to open and close a popup

⚠️Disclaimer When completing exercises, some data values or screenshots may not match what you see on your screen. It is because the current exercise is based on a feature that is currently in BETA.


  1. Click Edit

image

  1. Now that we are an editor of the dashboard, we can see that there is a hidden page. Click the Employee Rates Table tab.

image

🚩 The Employee Rates Table provides us with an understanding of the rates that are used for calculations in the Financial Plan and Employee Plan. However, we want to access the Employee Rates Table in an easier way. In order to do that, we want to provide a jumpoff point in the Employee Plan Table that can show us the rates.

  1. First, we want to copy the table. Click into the edge of the Table. Right click and click Copy. Alternatively, we can also press CTRL + C.

image

  1. Click on the Employee Plan tab

image

  1. Click on the Left Side Panel icon

image

  1. Click Outline

image

  1. The blue circular dot on the Left Side Panel indicates that Page 3 is the current active page. On Page 3, click on the More icon.

image

  1. Click Add Popup

image

  1. Press CTRL + V to paste the Table into the Popup

image

  1. Click Continue

image

⚠️ Quality check! Does your Popup look like this?

image

  1. We want to resize the Popup in the Styling panel. Click the Right Side Panel icon to open the Styling panel.

image

  1. Once the panel opens, click the top right corner of the panel to switch from the Builder Panel to the Styling Panel

image

  1. In the Left Side Panel, click Popup_1 so that we can access the Styling panel for Popup_1 instead of the Table.

image

  1. In the Styling panel, scroll down until you see the width and height. Change the width to 1700.

image

  1. Change the height to 524

image

  1. Click the Right Side Panel icon to close the Styling panel

image

  1. Now, we want to make sure that we have the ability to close the Employee Rates Table in the Popup via a Button. We will add a Button by clicking the Add icon in the top panel.

image

  1. Click Button

image

  1. We want to move the Button to the top right of the Table. Click the edge of the Button and drag.

  2. Drag the Button to the top right of the Table

image

  1. We want to rename the Button. Click the Right Side Panel icon to open the Styling panel.

image

  1. Under Text, rename the Button to Close Rates Table

image

  1. Click the Right Side Panel icon to close the Styling panel

image

  1. We want to resize the Button to make it larger. Click on the bottom left corner of the Button.

  2. Drag the button to lengthen the width

image

  1. Now, we will begin the scripting. Click on the Employee Plan tab.

image

  1. Click onto the shape.

image

  1. In Shape_7, click the Edit Scripts icon

image

  1. Click onClick

image

🚩 Welcome to Scripting! Scripting allows you to write scripts that can perform complex actions for widgets, such as customizing user interactions in widgets. While writing the scripts, you can press CTRL + SPACE on your keyboard to show all the available scripting commands.

  1. Type Popup_1.

image

  1. Press CTRL + SPACE on your keyboard to open a list of available scripting commands. Click open. This command enables the Popup to open when it is clicked.

image

  1. Press the semicolon ; on your keyboard

image

  1. After writing a script to open the Popup, we now want to write another script to close the Popup. Click Popup_1 in the Left Side Panel.

image

  1. Scroll to the right of the Table until we see the Button. Click on the Close Rates Table Button.

image

  1. Click on the More Actions icon

image

  1. In Edit Scripts, click onClick

image

  1. Type Popup_1.

image

  1. Press CTRL + SPACE on our keyboard to show a list of available commands. Click close.

image

  1. Press the semicolon ; on your keyboard

image

  1. Now, we will save our dashboard. Under File, click Save. Alternatively, you can also press CTRL + S.

image

  1. Now, we will go into View mode to test out the Popup. Click View, which will bring us to a new tab.

image

  1. Click the Employee Plan tab

image

  1. Click on the shape to launch the Employee Rates Table

image

  1. Now that the Popup is open, we can now close it. Press on the Close Rates Table Button.

image

Summary

You have completed the entire Integrating Scripting section!

You are now able to:

  • Understand how to add a popup in a dashboard
  • Utilize a button to increase user interaction in a popup
  • Write scripts to open and close a popup

Continue to - Task1 - Evaluate the Usability of the Left Side Panel