Skip to Content

How to show multiple selections in a text box in design studio

Dear Gurus,

I would like to show multiple selected values from my list box selection in design studio in a text box.

For this, I am using the following script to bring it in text box

TEXTBOX_1.settext(LISTBOX.getselectedvalue());

Any suggestions?

Regards
Sumit

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 11, 2017 at 12:21 PM

    Hi,

    Please refer the below URL,

    https://blogs.sap.com/2014/09/13/dynamic-selection-in-listbox-using-arrays-in-design-studio-13/

    Example:

    1. Set Multiple selection set true in List Box property.

    2. Copy and paste below code in Onselect Event of list box.

    var arr = LISTBOX_1.getSelectedTexts();
    var str ="";
    arr.forEach(function(element, index) {
    str = str+ element +";";
    });
    
    
    TEXT_3.setText(str);
    

    3. We have four script functions for ListBox. Either single selection, you can use getSelectedText or getSelectedValue. For Multiple selection, you can use getSelectedValues or getSelectedTexts.

    4. Display the Multiple values in the TextBox using comma or semicolon separator.

    Regards,

    Vidhya.C

    Add comment
    10|10000 characters needed characters exceeded