Skip to Content
0
Feb 12, 2021 at 05:26 PM

SAC App Designer - ExpandNode syntax help

385 Views

Another SAC App Designer scripting question

I'd like to be able to use a script to drill down in a waterfall chart, the setHierarchylevel() parameter doesn't work
so think I need to use the expandNode() parameter.

I'm struggling to get my head round the expandNode syntax, the Developer guide isn't very clear (to me at least)

If anyone has a working example of this it'd be much appreciated

Example

Waterfall chart containing:
3 Measures - m1, m2, m3
1 Dimension which is part of a hierarchy "Group" > "Row"

The 'expand node' button in the below screenshots is where i'm testing syntax to try and get it working.

1. Waterfall chart

2. Via the UI - the 'expand group' icon functionality is what I'm trying to perform programmatically
(the eventual aim being that the node is expanded during a radio button onClick event)

3. The desired result - the Waterfall chart showing the expanded node / lower hierarchy level

Page 51 of the Developer Handbook provides the following example:

// One node (Location="California") is expanded
Chart_1.getDataSource().expandNode("Location_4nm2e04531",
{ "Location_4nm2e04531": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]",
// California "@MeasureDimension": "[Account_BestRunJ_sold].[parentId].&[Discount]" });

Attachments

wf1.png (18.7 kB)
wf2.png (30.0 kB)
wf3.png (26.9 kB)