Skip to Content
avatar image
Former Member

GetMemberList - How can I filter returned values?

I am trying the following:

I use a HANA calculation view as a data source. I want to fill a dropdown-box via script with the dimension values from the data source and I want to filter the values. The filter is not set on the dimension which I want to fill the dropdown box with.

It seems that is not possible - getMemberList always returns all dimension values, no matter what I do. Until now, I tried the following:

- Setting a background filter in the initial view

- Using SetFilter-Statement in the script for event "On_Startup"

- Creating a variable in my HANA calculation view and using setVariableValue as well as setVariableValueExt as suggested here:

- Using Property Binding with "Follow Filter state" set to 'true'

None of these were successful.

When I link a crosstab or a chart component to my view, the filter as well as the variable works fine, so I think the HANA calculation view cannot be the problem.

In thread I read the following:

"getMemberList retrieves a list including all values, possible for current filter settings / selection.
getMembers retrieves all possible values for selected dimension. The current filter settings are ignored."

but in my case, getMemberList also ignores all filter settings.

I've also read SAP Note 2067424. The last statement there says: "Dynamic filters, which were applied on the same dimension for which getMembers or getMemberList is executed, are ignored by design.", but as I mentioned already above, I don't set the filter on the same dimension for which I execute getMembersList.

I am using DS 1.6 SP4, connected to BI-Plattform 4.2.

I think there must be a way to fill a dropdown (or listbox etc.) with values from a data source under consideration of filters, or not?

Thanks in advande and best regards,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Mar 06, 2017 at 11:18 PM

    Hi Oliver,

    What you have described is a standard cascading filter scenario which should work out-of-the-box if you apply setFilter() in the "On Startup" event of the application or even as a Background Filter in the Initial View.

    Have you set the Members for Filtering option of the dimension used to fill your list to "Only Values with Posted Data" in the Initial View of the data source?



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Oliver,

      Further to my suggestion above, I have created a working example with a BW BEx data source as shown below. Exactly the same principle should also apply to HANA data sources.

      Initial View without Background Filter:

      Initial View with Background Filter Applied:

      Members for Filtering Setting in Initial View:

      On Startup script code:

      var myMemberList = DS_1.getMemberList("ZAIRLINID", MemberPresentation.INTERNAL_KEY, MemberDisplay.TEXT, 100);

      Result - list shows filtered members as expected, same as Crosstab:

  • avatar image
    Former Member
    Mar 17, 2017 at 12:21 PM

    Hello Mustafa,

    setting the Members for Filtering option in the initial view solved my problem.

    Many Thanks!

    Add comment
    10|10000 characters needed characters exceeded