cancel
Showing results for 
Search instead for 
Did you mean: 

<DATASOURCE>.getDataAsString with initial selection

andreas_lcher
Participant
0 Kudos

Hi Experts,

i have a question concerning the command <DATASOURCE>.getDataAsString (Measure, Selection). My Datasource is a BEx-Query with three keyfigures and without any characteristics. I want to write the value of keyfigure x into my text-field "TEXT_1". I want to do it via "On Startup-Script" as follows:

TEXT_1.setText(DS_1.getDataAsString("07HWF6GK7KTOA7V0PEFAE7TEU[keyfigure x]","Selection[as i don't have any characteristics in my query, i don't want to use this parameter]");

The problem is that i do not have a value for the parameter "Selection" as i don't have any characteristics in my query. Can anyone help my to solve the issue?

Thank you in advance.

Kind regards,

Andreas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

That should work fine, have tried already?:

TEXT_1.setText(DS_1.getDataAsString("07HWF6GK7KTOA7V0PEFAE7TEU[keyfigure x]", {});

BR

Former Member
0 Kudos

Hi,

I am trying to do the same but I encounter an error which says that the keyfigure is not valid for the data source DS_1.

Please help.

Regards,

Varsha

andreas_lcher
Participant
0 Kudos

Hi Varsha,

did you check if the keyfigure is in your datasource DS_1?

Regards,

Andreas

Former Member
0 Kudos

Hi Andreas,

Yes, the keyfigure is in the data source.

Strangely it  din't work initially..but seems to be working now...

Anyways thanks for the help!

Regards,

Varsha

Answers (1)

Answers (1)

andreas_lcher
Participant
0 Kudos

Hi BR,

thank you. Totally easy. Works perfect.

Kind regards,

Andreas

Former Member
0 Kudos

Great.

PS: I should stop abbreviating Best Regards with BR 😉

The german version of it (VG) matches a lot better to my first names.

Former Member
0 Kudos

Hi Victor

My key figure contains values as well as * for incomputable data types. The values are showing fine, but the * is not showing.

Did I miss anything?  TEXT_1.setText(DS_1.getDataAsStringExt("00O2TFI34AYAXAKC3EG1B9QKT", {}));

Former Member
0 Kudos

Hi

I also tried getDataAsString