Symptom
SAC input control script APIs, such as getActiveSelectedMembers() and setSelectedMembers(), do not support dimension input control. However you are able to use and save them with dimension input controls in Edit Mode.
Environment
SAP Analytics cloud
Reproducing the Issue
- Create a dimension input control.
- Using the input control API on it, like InputControl_1.getInputControlDataSource().getActiveSelectedMembers();
- In view mode, the script does not work.
Cause
It's by design that these APIs does not support dimension input control. Script APIs do not recognize the type of input control in Edit Mode, only when you execute the scripts in View Mode, the dimension input controls are identified and APIs are blocked from execution.
Resolution
Manually switch the member in dimension input control instead of using script API.
Keywords
dimension input control, script API, getActiveSelectedMembers, setSelectedMembers, optimized story, sap analytics cloud, scripting limitation, error in console, enhancement request, unified story scripting. , KBA , LOD-ANA-UNS-SCR , Unified Story Scripting related Issues , Problem
SAP Knowledge Base Article - Public