Skip to Content
avatar image
Former Member

Command getMemberList


Hello Experts,

I have a question about the command getMemberList. I want to populate the dropdown values with the characteristic of a datasource dimension. The Dimension is 0COUNTRY and datasource is DS_1. My problem is that in the result (values display of the dropdown box) are more values as in the inital view of the datasource. It looks like that the whole master data of the infoobject is shown and not only the posted values. I used the following command: DROPDOWN_1.setItems(DS_1.getMemberList("0COUNTRY", MemberPresentation.INTERNAL_KEY, MemberDisplay.KEY_TEXT, 1000));

Has anyone an idea?

Thanks

Constantin

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Nov 02, 2015 at 07:39 AM

    Hi Constantin,

    The behaviour you have experienced is the standard behaviour, whereby as you have observed, the members of the entire master data are returned, even if there are no posted values. A workaround to achieve your desired result could be as follows:

    1) Apply the getMembers() method to obtain all the master data for the dimension;

    2) Loop through the member list and then check the value of the corresponding measure using the getData() method. If the measure value is non-zero then add the member to the dropdown list using the addItem() method.

    Regards,

    Mustafa.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Constantin,

      Unfortunately, the log warnings are a known side-effect of this workaround. I remember it was mentioned by Karol Kalisz in a similar discussion but I was not able to find it again for your reference. I don't think there is a way to prevent the warnings appearing in the log.

      Regards,

      Mustafa.

  • avatar image
    Former Member
    Nov 02, 2015 at 08:12 AM

    Hello Constantin,

    To avoid this, Edit your Datasource Initial View, then right click on your dimension / Members for Filtering then select "Only values with posted data".

    Tell me if it's what you want 😊

    Regards,

    Jonas.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 02, 2015 at 01:56 PM

    Hi Constantin,

    is your datasource a BW query?

    Try to set 'only posted values' for the characteristic there.

    Regards

    Steve

    Add comment
    10|10000 characters needed characters exceeded