Hello All!
I wanted to share my Proof of concept about Creating an alert or popup in the SAP Analytics Cloud, This feature will be very useful for alerting purposes.
SAP Analytics Cloud is used to create reports and planning with many features, in that particularly the SAP Analytics cloud allows developers to develop a report in three types types
- Optimized Design Experiences
- Classic Design Experiences
- Analytical Application
Each has its special features, in our case, we going to use Optimized Design Experiences (ODE), Since Classic Design Experiences doesn't support scripting features.
Step 1
- Create a story in Optimized Design Experiences
- Drag a chart and then select the data source, in my case, I choose a required model for the data source.

Step 2
- Choose the required measure and dimensions that to be displayed in the corresponding chart.
- In my case, I chose the Numeric chart and Revenue as measures.

Step 3
- In the left side panel, you can find the Outline tab, click on it.

Step 4
- Select Page 1, click on more options
- Add Popup

Step 5
- In Popup, I have added an image for the warning and a text box to display the alert message.
- The popup is one of the best features, we can display one complete KPI chart or table in the popup itself.

- Go to edit the script for Popup, initally it should be closed because whenever the revenue goes below 8000 then only it will be execute, so I coded accordingly.

Step 6
- Select the Page_1 and go to Edit Scripts

Step 7
- Select onInitialization
- Here is my code, this code is used to get all the data in that particular chart and store it in a variable called Revenue, In my case, I want to display the popup when the Revenue goes below 8,000.
- If the revenue value go below 8,000 then the Popup will display, If not then the Popup will remain closed.
- Save the story and see it in view mode.

Output
Here The Revenue value is 7000, I coded it to show the alert popup whenever the revenue goes below 8000.
And So the Popup is displayed successfully.

Thank You.