on 07-02-2014 12:18 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.