Symptom
The script variables are populated but the dropdown is still empty.
Environment
SAP Analytics Cloud
Reproducing the Issue
Create a dropdown with data source type - script variable and populate the script variable.
Cause
The script variables need to be initialized.
Resolution
Initialize the script variables before pushing values into it.
sample code:
var salesManager = Table_1.getDataSource().getMembers("Sales_Manager__5w3m5d06b5",100);
ScriptVariable_ID = [salesManager[0].id];
ScriptVariable_Name = [salesManager[0].description];
for (var i=1;i<salesManager.length;i++){
ScriptVariable_ID.push(salesManager[i].id);
ScriptVariable_Name.push(salesManager[i].description);
}
Keywords
SAC, dropdown, binding, script variable , KBA , LOD-ANA-AD , Analytics Designer , LOD-ANA-UNS-SCR , Unified Story Scripting related Issues , Problem