Hi Nikhil,
Tried the above code and already set with posted data, the second line of your code retrieves all the countries in the listbox + filtered countries as well rather only filtered countries.
State displayed only for India but not US.
In ListBox(OutPut) it displays now after adding your code like below:
US
India
Mumbai
Delhi
Pune
Chennai
US is not showing its state.
Load Button:
I have copied the same code to show all countries and under it states by default like below:
var Countries = DS_1.getFilterText("YCoun");
var aCountry= DS_1.getMembers("YCoun");
aCountry.forEach(func(country, i){
LISTBOX_1.addItem("" + i, country);
});
DS_2.setFilterExt("YCoun", Countries)
// Once this is filtered only members in state are those which belongs to respective countries
// (selected in Dimension Filter ).
var aState=DS_2.getMembers("YStat", 10);
aState.forEach(func(state) {
LISTBOX_1.addItem(state.internalKey, state.text);
;});
The List Box messes and showing nothing at startup onload when dimension filter are not selected and when selected it is behaving like i mentioned above.
Thanks for your early response.
-Dinya.