cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Error Passing Multiple Values From List Box

SATHISH_BTP
Participant
0 Kudos

Hi,

I am New To Design Studio Present I am Working On Xcelsius today I got Requirement For Dashboard in  Design Studio i.e I have List Box with Exports And Imports As Lables And Chart Showing Net Values Based on Plant,Requirement Is when Ever we click on Exports we need to Pass Plant 2000 and 3000 and if they click on Imports It should Pass 5000.

For That I have Given Values For Lables

  • Exports as 2000,3000
  • Imports as 5000

In On select Event I have Written Following Script

DS_1.setFilterExt("0PLANT",LISTBOX_1.getSelectedValues());


But i am Getting Error Cannot Convert From"String array " to "Input String"


Screen Shot Attached For Reference Could you please help on this.

Accepted Solutions (1)

Accepted Solutions (1)

MustafaBensan
Active Contributor
0 Kudos

Hi Sathish,

Changing the list key value to "2000;3000" should do the trick.  i.e. replace the comma with a semi-colon.

Regards,

Mustafa.

MustafaBensan
Active Contributor
0 Kudos

Also, in addition to my previous comment, you should use the getSelectedValue() method instead of getSelectedValues(), assuming you would like to allow selection of just one list box item at a time.

SATHISH_BTP
Participant
0 Kudos

Hi Bensan,

I have Changed as advised By you Getting Same Error could you please tell me any other alternative to pass multiple values.

Regard's,

Sathish

MustafaBensan
Active Contributor
0 Kudos

Hi Sathish,

This method actually works for me.  It looks like you are using a BEx data source which is how I have tested.

Can you provide a screenshot of the new List Box values as well as the script editor?

Thanks,

Mustafa.

SATHISH_BTP
Participant
0 Kudos

Hi Bensan,

Now Its working Fine Thank You For Prompt Response,I have Doubt when can we use Get selected Values() Could you explain inbrief and also Arrays concept in design studio.

Regard's,

Sathish.

MustafaBensan
Active Contributor
0 Kudos

Hi Sathish,

getSelectedValues() should be used when you have set the List Box Multiple Selection property to true.  It allows the user to select multiple items from the list simultaneously.  However, this returns an array of strings which is incompatible with the Input String data type that setFilterExt() expects, so you would need to iterate through the array and convert it to an input string in that case.

Regards,

Mustafa.

SATHISH_BTP
Participant
0 Kudos

Hi Bensan,

Thank you,How can I get thorough Knowledge on scripting I am new to design studio for some of the scripting Parameters I am unable to Understand Could You please suggest on this.

MustafaBensan
Active Contributor
0 Kudos

Hi Sathish,

You can initially refer to the script API documentation in the Design Studio Application Designer Guide.  You may also find relevant tutorials here.  Apart from that you can search the SCN blogs for relevant information.

Regards,

Mustafa.

Answers (0)