cancel
Showing results for 
Search instead for 
Did you mean: 

How to use setText method for multiple selection?

Former Member
0 Kudos

Hi all,

I wonder how the setText method can be used for multiple selections?

I have a listbox for customer. The listbox is enabled for multiple selection. I would like to show within the text field in the application all selected values.

I am using following script:

TEXT_FROMCUST.setText(LISTBOX_CUSTOMER.getSelectedText());

This works fine. However, it does not show more than one customer. I am aware that this script does not apply for multiple selection, but what script I have to use for multiple selection?

And while we are on this subject: The selected customers are marked in the listbox. But this marking remains even though the values are being resetted via reset button. Any idea how this marking can be removed?

Thanks for your help.

Regards

Mehtap

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184594
Active Contributor
0 Kudos

Try to use the script below:

DS_1.getFilterText("0CUSTOMER");

This should display more than one value.

Former Member
0 Kudos

Hi Zahid,

thanks for this.

The script you mentioned is to populate the listbox, isnt it?

What I need is, to fill the text field with the selected customers from the listbox.

The script I am using TEXT_1.setText(LISTBOX_CUSTOMER.getSelectedText());

seems to work for just one customer. It does not work for multiple selection.

Any idea?

Thanks again.

Mehtap

alexandre_dussac
Participant
0 Kudos

Hi,

What about getSelectedTexts() or getSelectedValues()?

Cheers,

Alex.

former_member184594
Active Contributor
0 Kudos

Hi Mehtap,

Using the script will give you multiple selections.

This is how I did it and it works well. It just separated the values by semicolon ";" .

TEXT_1.setText(DS_1.getFilterText("0CUSTOMER"));

When selected only one value:

When selected more than one value:

Former Member
0 Kudos

Hi Zahid,

finally I understood :-))))

The method works fine!

Thank you very much.

Mehtap

Former Member
0 Kudos

Hi Alexandre,

thanks for your efforts.

Both getSelectedTexts () and getSelectedValues() do not work.

Cheers

Mehtap