cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

GetMembers Method

0 Likes
484

I am trying to get an array of a dimensions values in a data source alias. When using a universe as a data source, there is a function called getmembers that will return an array of a dimension's values. However, when I use Design Studio HANA and use a model as a data source, this method is not available. In fact, there are no data source methods that return a list of dimension values.

I was wanting to get a list of all the values of a dimension.

Then, I wanted to insert these values into three different listboxes. The first ten into listbox 1, the next ten into listbox 2, and the final ten into listbox 3.

This would be very simple, if I could assign the members to an array and then use the foreach method to loop thorough the values and assign them to the different listboxes.

I guess my questions are:

1. Is the getmembers method really gone for HANA data sources?

2. If it is gone, is there another way to populate an array from a data source?

Thanks,

Robert

View Entire Topic
0 Likes

I thought about populating a listbox with the dimension values using the getMembersList method, and then looping through the values in the listbox. However, there is no foreach method associated with the listbox control.

Can the listbox control be extended to contain a foreach method?

Former Member
0 Likes

Hi Robert,

What do you mean by looping through the listbox?

Can you please explain your specifications ore detailed, (preferably with some images)

Regards,

Fazith Ali Z

0 Likes

Hi Fazith Ali Z,

Thank you for your response.

I have a query that will return 30 or so product names that a customer uses. We want to take the first ten products and put them in a list box. Then, put the next ten in another list box, and then finally the remaining products in the third list box.

I was thinking that the code would look like (May have syntax errors):

var arr_products = DS_1.getMembers("PRODUCTS", 30);

var num_products = 0;

arr_products.foreach(function(element, index) {

   num_products = num_products + 1;

   if(num_products <= 10){

      LB_FIRST.additem(element);

   }

   else {

      if(num_products >= 11 AND num_products <= 20){

         LB_SECOND.additem(element);

      }

      else {

         if(num_products >= 21 AND num_products <= 30){

            LB_THIRD.additem(element);

         }

      }

   }

}

Message was edited by: Robert Schmidt Seems like this would work, but with the HANA install and running the application on HANA, the getMembers method has disappeared from the data alias object. Thanks, Robert

former_member193885
Contributor
0 Likes

Robert,

Looks like this method is not supported with a native HANA deployment.  Please see note below with restrictions, this is for DS 1.3.  If you have the BI Platform deployment option try that.

http://service.sap.com/sap/support/notes/1993123

Thanks.

0 Likes

Thanks Deepu,

Seems like a lot of stuff to work around. HANA deployment seems like the way to go, but with these limitations, probably will go back to BI deployment.

BTW, how did you find that article so fast?

Thanks again.

former_member193885
Contributor
0 Likes

I had seen that note before and knew there were restrictions on the APIs available for the HANA deployment.  You could also search under the category bi-ra-ad* from http://service.sap.com/notes

The ListBox or Dropdown doesn't seem to have an option to read all the members to an array (for BIP deployment also).

HANA deployment at this point definitely has lot of limitations, I am sure those will be fixed in the future releases.

Thanks.