Quantcast
Channel: SCN : Discussion List - SAP BusinessObjects Design Studio
Viewing all articles
Browse latest Browse all 4041

Get dimension values with getMembers?

$
0
0

Hi,

 

I have a data source with the following dimensions in my SAP Design Studio dashboard:

 

Key 1 (String)

Key 2 (String)

Measure 1 (int)

KEY_1

Description 1

x

KEY_2

Description 2

y

KEY_3

Description 3

z

KEY_4

Description 4

w

 

I would really like to display the different keys in text fields because I am going to display the descriptions. After a heavy amount of searching online, I have come to an understanding that getting dimension values is quite difficult. (I am not trying to get the measure which easily can be obtained with the DS_1.getData() method)

 

A work around I have found is to use the following code:

 

var Dim_For_Description= DS_1.getMembers(Dimension, 100); 

 

Dim_For_Description.forEach(function(Dim_Desc, Dim_i) { 

if(Dim_i==1){Desc_1= Dim_Desc.internalKey;}

else if(Dim_i==2){Desc_2= Dim_Desc.internalKey;}

else if(Dim_i==3){Desc_3= Dim_Desc.internalKey;}

else if(Dim_i==4){Desc_4= Dim_Desc.internalKey;}

else if(Dim_i==5){Desc_5= Dim_Desc.internalKey;}

else if(Dim_i==6){Desc_6= Dim_Desc.internalKey;}

else if(Dim_i==7){Desc_7= Dim_Desc.internalKey;}

else if(Dim_i==8){Desc_8= Dim_Desc.internalKey;}

else if(Dim_i==9){Desc_9= Dim_Desc.internalKey;}

else if(Dim_i==10){Desc_10= Dim_Desc.internalKey;}

});

 

The problem is that the DS_1.getMembers() sorts the members alphabetically while I need them to be according to the sorting in the DS.

 

 

Is there any work-sround for this problem?

I am using Design Studio 4.1


Thank you.


Viewing all articles
Browse latest Browse all 4041

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>