Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Design Studio does not support cascading filter usage with unx data sources if you want to follow classical way as you could find at official tutorial :

Simply filter a datasource based on a selection from a dropdown box , and use getmemberList method on that data source to fill another dropdown box.

If you use this method with unx data sources, you would realize that all members are added to the second dropdown_box, that means this method doesn't work, obviously.

You can use cascading filters with the method i mentioned below. But i must warn you that as much as members you have to be cascading filtered (for instance, if you have thousands of material ids), you will have worse performance. Because this method takes dimensions member by member, and use them all to check if they needed to be added to the second dropdown box (or listbox )

We will select country from dropdown box 1 (DD_BOX_1) and fill DD_BOX_2 with cities belong to this country

1- create an array with members of a dimension which you want to use in your dd box( to be cascading filtered)

2- do a for loop through this array, and add items if the result set is not empty.

Basically let's say you filled first DD box with DS_1 dimension members like (Country) and selected a country and with that selection you will filter DS_2.

After that; you will filter DS_2 with each City member. if result set is not empty, which means that city belongs that country, you add this city to your DD_Box_2, else simply ignore this city.

sample:


//on startup

DD_BOX_1.setitems(DS_1.getmemberlist(Country),..,...,...);

// on dd_box_1 on select event


var array = DS_2.getmembers(City;999 (tool suggests not to enter a value above 100 btw but if you need more members you can write 999 for ex.));


DS_2.setfilter(Country;DD_BOX_1.getselectedmember());


array.foreach(function(element,index)

{DS_2.setfilter(City, element.internalKey (or text doesnt matter at unx);

if(DS_2.isResultSetEmpty())

{

//do nothing

}

else { DD_BOX_2.addItem(element.text , element.text)  ;}

});

Regards,

Onur

16 Comments
Labels in this area