cancel
Showing results for 
Search instead for 
Did you mean: 

How to check if a characteristic has been selected in a crosstab

0 Kudos

Hi all,

I have a crosstab enabled for selection. 'On Select' I want to check if a characteristic has been selected.

I tried:

var A01 = CROSSTAB_1.getSelectedMember("0PROFIT_CTR");

if ( A01 != '' ) {TEXT_1.setVisible(true); }

This however is not allowed because the arguments are not the same. A01 is a member, and ''' is a string.

I found a work-around using a dummy DS:

DS_2.setFilter("0PROFIT_CTR", CROSSTAB_1.getSelectedMember("0PROFIT_CTR"));

var A01 = DS_2.getFilterText("0PROFIT_CTR");

In this way A01 is a string as well and I can do the check.

Is there an easier way to achieve this?

Thanks end best regards,

Arwold

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Arwold,

Add .text to the getselectedmember command, and it will be interpreted as a text field.

example:

var test = TEXT_1.getText();

if(test != CROSSTAB_1.getSelectedMember("0GL_ACCOUNT").text){

}

Kind regards,

Sjoerd

Answers (1)

Answers (1)

0 Kudos

Hi Sjoerd,

Thanks, this works.

Best regards,

Arwold