Skip to Content
1
Sep 15 at 09:05 AM

Dropdown Filter Script Issue

86 Views Last edit Sep 16 at 08:12 AM 3 rev

Hi,

If i can execute/run the multiple scripts. getting an error,
If i can run individual/single script there was no error.

Could please explain me where was the issue;

CANVAS: onInitializaton:
var  SEGMENTDimension = Table_1.getDataSource().getMembers("SEGMENT");
for (var i=0; i<SEGMENTDimension.length;i++) {
	Dropdown_1_Region.addItem(SEGMENTDimension[i].id,SEGMENTDimension[i].description);
}

var   PeriodDimension = Table_1.getDataSource().getMembers("Date");
for (var i=0; i<PeriodDimension.length;i++) {
	Dropdown_2_Period.addItem(PeriodDimension[i].id,PeriodDimension[i].description);
}

DropDown_1:
var sel = Dropdown_1_Region.getSelectedKey();
Table_1.getDataSource().setDimensionFilter("SEGMENT",sel);

DrpDown_2:
var sel = Dropdown_2_Period.getSelectedKey();
Table_1.getDataSource().setDimensionFilter("Date",sel);



Attachments