cancel
Showing results for 
Search instead for 
Did you mean: 

getMemberList() on dimension with keys (UNX universe) DS1.3

XaviPolo
Active Contributor
0 Kudos

Hello,

I have an unx universe with a COUNTRY dimension.

it has a Primary Key defined.

I'm trying to get a member list with:

DRP_COUNTRY.setItems(DS_COUNTRY_LIST.getMemberList("_g1wJeoj8EeONX6-WtGiC9g", MemberPresentation.INTERNAL_KEY, MemberDisplay.TEXT, 0));

but this returns only text values for key and dimension.

Brazil/Brazil instead of 37/Brazil

DRP_COUNTRY.getSelectedValue() and DRP_COUNTRY.getSelectedText() return the same Text value

I'v tried also with MemberPresentation.EXTERNAL_KEY and NONCOMPOUNDED with same result.

any idea?

The problem is that if I define a variable (prompt) with this dimension, it expects a KEY value, and I can't pass the selected value from the drop list.

Thank you.

Accepted Solutions (0)

Answers (1)

Answers (1)

shlomi_weiss2
Participant
0 Kudos

Hi

I've found a kind of a workaround for that

You can concatenate the key and the text of the field to a new field let's say with a '-' between them

and then use the following command to get the key to be transferred to your prompt:

var compCodeKeys = '';

var filterArray = DS_COMPANIES.getFilterText("your_dimension").split(";");

var find = 0;

if (filterArray.length != 0)

{

      filterArray.forEach(function(element, index) {

        find = element.indexOf("-");

        compCodeKeys = compCodeKeys + element.substring(-1,find) + ';';

      });

      APPLICATION.setVariableValueExt("your_variable_name", compCodeKeys);

}

else

{

      APPLICATION.setVariableValueExt("your_variable_name", '');

}


It's not such a neat solution,

But I've tested it and it works


Shlomi