Exploring SAP Analytics Cloud (SACE 11): Scripting Advanced Stories

๐ŸŽฏ Objective

After completing this lesson, you will be able to create an advanced story using scripting.


๐Ÿง  Overview: Scripted Stories in SAP Analytics Cloud

While SAP Analytics Cloud offers powerful no-code options to build stories, scripting is used when you need more control and interactivity.

Scripts are written in a subset of JavaScript, and are typically used to:

  • Customize user interactions

  • Automate behavior (e.g., switching pages, updating filters)

  • Enhance interactivity beyond standard UI options

  • Create tailored user experiences for planning, data analysis, or presentations


๐Ÿ’ก Why Use Scripting?

Use CaseBenefit
Custom navigationJump to specific pages or widgets programmatically
Dynamic filteringFilter charts and tables based on user input
Conditional visibilityShow/hide widgets based on logic
Guided workflowsCreate step-by-step user interactions
Disable standard featuresRestrict right-click menus or story functionality

๐Ÿ› ️ Scripting allows developers to go beyond drag-and-drop to create tailored experiences.


๐Ÿ’ป Scripting Capabilities and Environment

๐Ÿ“Œ Language

  • Subset of JavaScript

  • Uses SAP’s built-in JavaScript Script Editor

๐Ÿงฐ Script Editor Features

  • Auto-completion with Ctrl + Space

  • Syntax checking

  • Context-aware function suggestions

๐Ÿงช Examples of What You Can Script

javascript

// Change a page NavigationUtils.goToPage("Page_2"); // Set filter Table_1.setFilter("Region", "North America"); // Show a pop-up Dialog_1.open();

๐Ÿ” Security and Role Considerations

  • Scripting typically requires developer or advanced designer roles

  • End users interact with scripted behavior but do not see the code

  • Use wisely — poorly written scripts can degrade story performance


๐Ÿงญ Best Practices

  • Keep scripts modular and readable

  • Test thoroughly, especially when using user inputs

  • Use meaningful names for widgets (e.g., Chart_Revenue, Filter_Region)

  • Use comments to explain logic

Comments

Popular posts from this blog

Designing Stories in SAP Analytics Cloud (SACS 21): Building a Story

Designing Stories in SAP Analytics Cloud (SACS 21): Choosing Between Optimized and Classic Design Modes

Designing Stories in SAP Analytics Cloud (SACS 21): Introducing SAP Analytics Cloud Story Design