Multi Selection from a List Box to a Text Box

So I want to be able to make Multi Selections within List box and export it to the Text box. Right now I have a Script running on the cal of the Text Box
event.value = getField("LISTBOX").valueAsString;
Which is able to do one selection but I cant find anybody that can grab two selecitons and put into a text box with commas for something. Is there a way to do this?
-Zach

Wow over my head a little. I understand what an array is with script but not how to write the script to handle it. I made this:
event.value = getField("LISTBOX").value;
But still no change in the behavior with multi selections. Example below if you want to check it out.
https://dl.dropboxusercontent.com/u/2944617/formtext2.pdf

Similar Messages

  • Disable fields based on value selected from first list box.

    Hi All,
    I am facing a problem in module pool programing. My scenario is there will be around 50 fields in the screen  , within that first field is a drop down list box. In the list box there will be electricuty , gas and csw. If user select gas then the fields corresponding to gas will only be editable other fields not relevent to gas will be non editable(Disable).... Same case for electriciy andcsw also.
    Can any one guide me regarding this....
    Thanks in advance.
    Regards
    Ajoy

    Hi Asaha,
    This link will be of great help for you if you are new to Module pool.
    [Module Pool Notes|http://wiki.sdn.sap.com/wiki/display/Snippets/ModulePoolNotes]
    For [DYNP_VALUES_READ|http://wiki.sdn.sap.com/wiki/display/ABAP/FilteringF4HelpvaluesinTablecontrol,basedonotherfield+value] refer this link.
    For [DYNP_VALUE_UPDATE|http://wiki.sdn.sap.com/wiki/display/ABAP/GettingainputfieldpopulatedonenteringthevalueinoneInputfield]
    Regards
    Abhii

  • Counting the number of values selected in a list box

    I'm trying to add a counter to a form that tells the user how many values have been selected from a list box... I tried adding a FormCalc formula to a calculate event in the "counter" field as follows:
    count(form1.#subform[0].ListBox1.rawValue)
    But for some reason it's not adding them up. It only gives me a value of 0 when none are selected, or 1 where any number of selections are made.
    Can anyone help me out?
    Thanks in advance

    Try putting this in the calculate event of your counter field:
    var num=0;
    for (var a=0;a<ListBox1.items.nodes.length;a++){
    if (ListBox1.getItemState(a))
      num++;
    this.rawValue=num;
    Exit the list box and the field will calculate.
    Kyle

  • After selecting the value from the list box, want to disable checkbox

    hi guru,
    After selecting the value from the list box, want to disable checkbox and custom control textbox(container) in module pool.
    so please help me on this.
    thanx,
    man

    in PBO,
    loop at screen.
      if screen-name = your textbox's name.
        screen-input = 0.
        modify screen.
      endif.
    endloop.

  • Getting multiple values from a list box

    Hi,
    I am not able to get multiple selected values from a list box using the getParameterValues(). I used the following code..
    String[] names=request.getParameterValues("lname");
    can anyone tell me what the error is or is there any other way i can get multiple selected values from a list box.
    Thanks
    Satish

    Fragment 1
    This is the JSP Code am using for testing
    <%
    String[] name =request.getParameterValues("D1");
    if(name.length==1)
    String value=name[0];
    Instead of name.lenght==1 try with name!=null
    Fragment 2
    out.println(value);
    replace the above fragment with
    %>
       <%-- print result -->
       <%=name[0]%>
    <%
    Fragment 3
    else
    %>
    The list box D1 is a multiple select list box.
    If it still doesn't work, check that the checkboxes have the same name as well as different values
    <input type="checkbox" name="D1" value="1">
    <input type="checkbox" name="D1" value="2">I hope this helps :-)
    Good luck
    touco
    ps: i want duke

  • Selecting from a list to a table

    need help.i have items in a list and combo box in which i want it in such away that when item is selected from the list and combo box it goes to the table i have in a panel.i want to discard the text area i used.thanks in advance
    my code:
    '\n'
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.table.*;
    public class BreakFast extends JFrame implements ActionListener{
         private JList ingredient;
         private JTextArea meal;
         private JTable table;
         private DefaultTableModel model;
         private JButton move;
         private String[] food;
         private JComboBox box,box1;
         private String[] units;
         private double[] price={100,150,200,250,300,350,400};
         public BreakFast(){
              Container c=getContentPane();
              c.setLayout(new FlowLayout());
              food = new String[] {"Corn Flakes","Beans","Shredded Bread","Mushroom",
              "eggs","Milks","Butter","Sugar","water","Oil"};
              ingredient = new JList(food);
              ingredient.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
              ingredient.setVisibleRowCount(4);
              JPanel p = new JPanel();
              p.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
              //move = new JButton(">>>");
              //move.addActionListener(this);
              meal = new JTextArea(5,20);
              meal.setEditable(false);
              p.add(new JScrollPane(ingredient),"Wast");
              //p.add(move,"Center");
              p.add(new JScrollPane(meal),"East");
              JPanel p2 = new JPanel();
              p2.setBorder(new BevelBorder(BevelBorder.RAISED));
              units = new String[]{"2 cups","3 cups","4 cups","5 cups","1 mudu","2 mudu",
                        "3 mudu","4 mudu","5 mudu","6 mudu","7 mudu","8 mudu","9 mudu",
                        "1 bag"};
              box = new JComboBox(units);
              box.addActionListener(this);
              box1 = new JComboBox();
              //box1.setEditable(true);
              box1.addActionListener(this);
              for(int i=0;i<price.length;i++){
                   box1.addItem(price);
              model = new DefaultTableModel();
              model.addColumn("No.");
              model.addColumn("Food Items");
              model.addColumn("Units");
              model.addColumn("Price");
              String[] cell={"1","Rice","2 cups","#20"};
              model.addRow(cell);
              table = new JTable(model);
              JScrollPane pane = new JScrollPane(table);
              pane.setPreferredSize(new Dimension(200,100));
              p2.add(box,"North");
              p2.add(box1,"South");
              p2.add(pane,"East");
              c.add(p);
              c.add(p2);
              setSize(450,300);
              setVisible(true);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         public void actionPerformed(ActionEvent e){
                   Object[] value = ingredient.getSelectedValues();
                   if(e.getSource() instanceof JComboBox){
                        for(int i=0;i<value.length;i++){
                             String word = (String)value[i];
                             meal.append(box.getSelectedItem()+" "+"of"+" "+word+" "+box1.getSelectedItem()+"\n");
         public static void main(String[] arg){
              new BreakFast();

    So the problem is?
    All you need to do is to create the JTable first of all (which you haven't done). Secondly, you create a TableModel for it so can manage its data effectively.
    Thirdly, you replace the code in your actionPerformed method to add a new row containing the data you received from the list and combo box.
    Now is that so hard? Okay, here is some code
    DefaultTableModel model = new DefaultTableModel(0,3);
    JTable table = new JTable(model);
    public void actionPerformed(ActionEvent e){
        Object[] value = ingredient.getSelectedValues();
        if(e.getSource() instanceof JComboBox){
            for(int i=0;i < value.length;i++){
                String word = (String)value;
    Vector<Object> data = new Vector<Object>();
    data.addElement( box.getSelectedItem() );
    data.addElement( "of" + " " + word );
    data.addElement( box1.getSelectedItem());
    model.addRow( data );
    ICE

  • Select item in list box using code

    We use Adobe Workflow v5. I am creating a Check Request application where users type information into various fields and when they click Add, the data is added to a List Box. Also when they click Add, if the current item is >$1,000, a query searches our accounting database to see if the client has outstanding AR older than 90 days. If they do, another list box is displayed with the client name and amount of outstanding AR.
    If that clientnum is already in the second list box, it does not add another one.
    To delete a record from the first list box, the users select the item in the first list box, and then click a Delete button. That deletes the
    record in the first list box.
    I am also trying to delete the record from the second list box but am not sure how to select it using code. As part of the Delete button code, if the currently selected item (the one they want to delete) is >$1,000, I go through each row of the first list box to see if clnum.text (field in the form where the record to be deleted is now displayed) matches the client number in column 4 of any row of the first list box. If it does, I see if the amount of the item in the first list box is >$1000.
    If it is, then I know that there is a corresponding record in the second list box.
    Here is some of the code:
    'go through each row in first list box
    For irow = 1 to lstExp.ListCount
    'set clientnum variable equal to client # in row in first list box
    clientnum = lstExp.RetrieveItem(irow,4)
    'if clientnum variable is equal to client # to be deleted from first list box (selected record - client # in clnum.text now)
    if clientnum = trim(clnum.text) then
    'if amt is >$1,000 in first list box
    if lstExp.RetrieveItem(irow,10) > 1000 then
    'don't delete row because there is another record in first list box
    DeleteOutAR = "N"
    else
    'delete row because there is NOT another record in first list box.
    DeleteOutAR = "Y"
    end if
    end if
    Next
    Here is the code I need help with. I am unsure how to select the record in the second list box so I can delete it.
    if DeleteOutAR = "Y" then
    'go to second list box ?
    form.GoToField(lstOutARUnbilled)
    'start going through second list box looking for clientnum
    For irow2 = 1 to lstOutARUnbilled.ListCount
    if clientnum = lstOutARUnbilled.RetrieveItem(irow2,1) then
    irow2 = lstOutARUnbilled.CurrentSelection
    lstOutARUnbilled.Removeitem (irow2)
    end if
    next
    end if
    So my question is, how can I move to the second list box to actually delete the record?
    Thank you in advance for any help.
    Mary

    Mary-
    The solution could either be quite easy or difficult dependent upon how the data is arranged in the subsequent list box.
    Basically, if there is any sort of corresponding or matching entries, meaning line 1 from list box #1 matches with line 1 of listbox #2, then you would simply execute the following...
    "listbox#2.RemoveItem listbox#1.CurrentSelection"
    Or if you have a column that would contain the same values, say an index, then you could just loop thru the 2nd listbox searching for that index and once found remove the line...
    "listbox#2.RemoveItem nRow"
    , where nRow would be the line that you discovered to have the matching index.

  • Select multiple items from a list box as values for a parameter of crystal report and Oracle procedure

    -  I have a  Product list box (asp.net) used as multiple selected values for  a parameter. 
    - The Product ID is defined in the Oracle procedure as NUMBER data type. 
    -  In my crystal report, I have a parameter field allow multiple values as p_product_id type as Number.  This is the code in my Record Selection Formula for the report:
    ({?p_product_id}[1] = -1 OR {Procedure_name.product_id} in {p_product_id})
    -  In C#, this is my code
    List<decimal?> productUnit = new List<decimal?>();
    int counter = 0;
    decimal prod;
    for (int i = 0; i < lstProducts.Items.Count; i++)
                  if (lstProducts.Items[i].Selected)
                                if (decimal.TryParse(lstProduct.Items[i].Value, out prod))
                                    productUnit.Add((decimal?)prod);                              
                                    counter++;
           if (counter == 0)
                       productUnit.Add(-1);                      
    ReportingDAO rDataFactory = new ReportingDAO();
    retVal = rDataFactory.GetProductReport(productUnit);
    public CrystalDecisions.CrystalReports.Engine.ReportDocument GetProductReport(List<decimal?> productUnit)
              CrystalDecisions.CrystalReports.Engine.ReportDocument retVal = new rptProductDownload();
              ReportLogon rptLog = new ReportLogon();
             rptLog.Logon(retVal, "RPT_PRODUCT_DOWNLOAD");
             retVal.SetParameterValue("p_product_id", productUnit); 
    I keep having the "Value does not fall within the expected range" when I debug.  My question is, is the data type I used for procedure/Crystal report/ and C# correct ?  I always have problem with the data type.  Any help would be
    appreciated
    Thank you

    Hi progGirl,
    Thank you for your post, but Microsoft doesn't provide support for CrystalReport now. Please post your question in SAP official site here:
    http://forums.sdn.sap.com/forum.jspa?forumID=313
    Thank you for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Value of a cell dependent on a data selected from the list in another cell

    Hello Everyone,
    Could you please help to solve this puzzle.
    I need to make a value of cells in the 2nd column dependent on the selection made in the cells in the 1st column, i.e.:
    Header 1
    Header 2
    List An
    LIst Bn
    Lists A and B have 10 items each
    A1    B1
    A2    B2
    A10  B10
    If A1 is selected I need a B1 appear in the second column in the same row, if A2 selected then B2,...and so on.
    Could you please hep to resolve this, if at all this is possible?
    Many thanks,
    Andrew

    Supposing that your list is a drop down list, you could put a script like the following on the exit event of List A. (very approximate, since I don't know any of your field names)
    switch (this.rawValue)
    case "A1":
         ListB.rawValue = "B1";
         break;
    case "A2":
         ListB.rawValue = "B2";
         break;
    Obviously, you'll want to replace "ListB" with the name of your field, and possibly the references to it (ie. TableName.RowName.FieldName) and fill in more case statements all the way to A10 if that's what you need. If List B is going to be a read-only field, you may even want to make it simply a text input box and have it display the values you want it to have based on the selection from List A.

  • Removing Items from Populated List-Box

    I have a drop down box populate a list box. (change: ListBox1.addItem(xfa.event.newText)) But I can add more then one of the same selection so how do I remove them from the ListBox. Upon click? somehow? I don't konw the lingo.

    There is a selectedIndex property that will give you back the index of the 1st item that is selected.
    Paul

  • The method of leaving cursor at selecting item of list box.

    Hello.
    Pleas let me ask about the subject!!!
    Concerning the screen by web-dynpro, I have a problem that when I select one listbox after selecting another listbox, the screen moves up to the top automatically.
    I would like to prevent from above moving.
    Could anyone specialist please tell me how leaving cursor at setelcting item of the list box.
    Thanks!!!

    Hi...
    there are two events which have been used, one is doubleclick event and the other one is on selecting the item from the list and clicking on OK button(this will be the most frequently used function, i cannot use event target event for this OK button... ) . I have attached the screen shot. Please have a look at it and let me know how can i achieve that...
    I can use custom event, but the main problem is that the inline itemeditor's details are not accessible in the code.... I can access some function from within the inline itemeditor combo box using outerDocument.myFunction() (this is something like GET). Is there a similar way, to SET the data into this itemeditor?

  • Can we select from drop down box ?

    Hi,
    I have a requirement where I need to select a value from a list and based on the value , the result shuold generated. for example, I have created a RTF in word ,
    now I need to select a hotel chain and based on that the result should occur on the screen.
    hare krishna
    Alok

    Did you mean drop down box on rtf template?Yes
    What version are using? EBS or Standalone? Oracle XML publisher template builder for word.
    version 5.6.2
    hare krishna
    Alok

  • Hi Regarding selection parameters and list box

    Hi
    This is the test Progra I am Checking for List but
    When ever , After selecting from list , if press enter the value is going off,
    and after executing I couldn't read P_int
    when i am not geting any value into p_int.
    REPORT YTEST_VINESH1.
    *TYPEPOOLS
    TYPE-POOLS : vrm.
    *Tables
    DATA DICLARATION.
    DATA : name  TYPE vrm_id,
           list  TYPE vrm_values,
           value LIKE LINE OF list.
    data: itab like lfa1 occurs 0 with header line.
    DATA:P_INT1(20) TYPE C.
    *SELECTION SECREEN
    PARAMETER : p_int AS LISTBOX VISIBLE LENGTH 20.
    *INITIALIZATION.
    initialization.
    select * from lfa1 up to 10 rows into table itab .
    AT SELEECTION EVENTS
    AT SELECTION-SCREEN OUTPUT.
      name = 'P_INT'.
    loop at itab.
      value-key = sy-TABIX.
      value-text = itab-lifnr.
      APPEND value TO list.
    endloop.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id     = name
                values = list.
      CLEAR list.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    MOVE P_INT TO P_INT1.
    WRITE:/ 'HAI HOW R U',P_INT1.
    Thanks & Regards,
    [email protected]

    Hi,
    Check this sample code:
    REPORT  ZDROP_DOWN_LIST.
    TABLES: LFA1.
    TYPE-POOLS: VRM.
    DATA: NAME  TYPE VRM_ID,
          LIST  TYPE VRM_VALUES,
          VALUE LIKE LINE OF LIST.
    PARAMETERS: P_LIFNR LIKE LFA1-LIFNR AS LISTBOX VISIBLE LENGTH 20.
    DATA: BEGIN OF IT_ITAB OCCURS 0,
          LIFNR LIKE LFA1-LIFNR,
          LAND1 LIKE LFA1-LAND1,
          NAME1 LIKE LFA1-NAME1,
          END OF IT_ITAB.
    INITIALIZATION.
    SELECT LIFNR LAND1 NAME1 FROM LFA1 INTO  IT_ITAB .
      VALUE-KEY = IT_ITAB-LIFNR.
      WRITE IT_ITAB-LAND1 TO VALUE-TEXT .
      CONCATENATE VALUE-KEY VALUE-TEXT
                  IT_ITAB-NAME1
                  INTO VALUE-TEXT SEPARATED BY '~'.
      APPEND VALUE TO LIST.
    ENDSELECT.
    NAME = 'P_LIFNR'.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        ID     = NAME
        VALUES = LIST.
    START-OF-SELECTION.
    WRITE:/ P_LIFNR.

  • How can I export multiple selections in a list box into a .csv file?

    Hi all, I've created a form in Acrobat X with a list box enabled for multiple selections. When I try to export the filled out form into a .csv file, only the first selection shows up. Can anyone help me figure out how to get all selections to export? Thanks!

    Thank you for your quick response!
    Once a recipient fills out the form (which has two questions with list boxes and multiple selection enabled) they send the completed form back to me. When I open the completed form, I am given the option add the completed form to a reponse file which was set up when I distributed the form. When I open the reponse file, it lists all of the responses in rows, and the values that were chosen in the form are arranged in columns. In this file, the list boxe columns have multiple values, separated by commas (which is what I'm looking for). At this point there is an option to export into a .csv file or an .xml file. If I choose the .csv file and open in excel, only the first selection shows in the list box column rather than all selections that were initially made by the responder.

  • When clicking on a lookup, firefor does not allow me to select from the list

    When I use firefox, the website I am on has lookup fields located on it, firefox does not allow me to select my preferred option from the list. also when I slect another lookup from a list it displays the message 'invalid lookup value located in field ......'
    This does not happen in IE

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

Maybe you are looking for

  • Best Practice Advice - Using ARD for Inventorying System Resources Info

    Hello All, I hope this is the place I can post a question like this. If not please direct me if there is another location for a topic of this nature. We are in the process of utilizing ARD reporting for all the Macs in our district (3500 +/- a few he

  • Almost all contacts disappeared on iPad

    I used Contact Cleaner to remove duplicates in my Address Book, a problem created long ago with sync problems with Outlook. A subsequent sync with my iPhone went OK, but the sync with my iPad deleted most contacts, leaving only one each for a few of

  • Lost address bar @ top.  How do I get it back?

    When I open my Yahoo page, the address bar at the top is now gone.  How do I get it back.  I'm using Safari as my browser.

  • Substitution for deriving Profitcenter from Cost center

    Hi SAP Gurus, I want a detail substitution steps for deriving the profit center for cost centeres. One PC is assigned to more than one cost center. Thanks In Advance. CHEERS

  • RG23A PART I and II tax amount

    Hi All, i have sale the some Quantity from the assemble plant. from these quantity some meterial return from customer becouse of some defect. how can i reverse that in purchase RG23A PART I and II tax amount. Please provide the valid information. Bes