Symptom
The getActiveSelectedMembers() API returns empty, even though there are active selected members on the input control.
Environment
SAP Analytics Cloud
Reproducing the Issue
The script is like the following:
......
InputControl_1.getInputControlDataSource().setSelectedMember();
......
InputControl_2.getInputControlDataSource().GetActiveSelectedMembers();
......
The two input controls use the same data source.
Cause
The issue occurs because the getActiveSelectedMembers() API from InputControl_1 cannot detect changes made on InputControl_2, as the contexts of different input controls are not accessible to each other.
Resolution
Add the following line of code after the existing call to setSelectedMember():
InputControl_1.getInputControlDataSource().getActiveSelectedMembers();
The getActiveSelectedMembers() API works on the same input control (InputControl_1). And when InputControl_2 calls getActiveSelectedMembers, the result is already stored.
Keywords
return empty, input control, active selected members, setSelectedMember(), getActiveSelectedMembers(), SAP Analytics Cloud, scripting issues , KBA , LOD-ANA-UNS-SCR , Unified Story Scripting related Issues , Problem
SAP Knowledge Base Article - Public