Fetching sub-screen check box value in module pool

Hi,
i hav a req in which i craeted a sub-screen in a standard sap screen QA11 using screen -exit.
This sub-screen has two check box's for 2 approvals.I hav craeted as screen with this 2 check box and made that as a sub-screen to main screen.
I hav few validations to be performed on these 2 check-boxes.
1.Enabling and disabling of resp check-box based on some condition.This is happening as i hav written some logic in PBO of the screen.
2.Validations hav to be performed on the check-box like if user clicks a check-box that value has to be captured and stored in a Z custom table.My main issue comes here.i hav written some code in PAI,but when i put a break-point,that code is not at all getting triggered.
Kindly,let me know how can i get the check-box value from the sub-screen which is craeted in the standard screen of QA11 using screen-exit.
Thanks in advance

Hi,
May be your code is written in PAI of some other screen.
check SY-DYNNR and also use this where you are checking chekbox value.
make sure your code is written in PAI of same subscreen
Thanks
Raghav M.

Similar Messages

  • List box values in module pool

    Hi All,
    Plz help me out in this regard..
    I have designed a screen with 20 list boxes around and i am getting values for list boxes also.the main problem is coming when after selecting values....
    that is after selecting values if i press enter on the screen the values are over written by space..
    The default value for list boxes are space.
    how to over come this problem...Plz help me out
    Regards,
    Sudha

    PAI
    MODULE user_command_1000 INPUT.
    CASE sy-ucomm.
    WHEN 'SAVER'.
             IF zrule_date_from  > zrule_date_to.
                MESSAGE e000 WITH : 'RUN_VALIDITY_TO_DATE can not be Less'(001)
                                    'Than RUN_VALIDITY_FROM_DATE'(002).
                EXIT.
             ENDIF.
             IF zrule_date_to  < sy-datum.
                MESSAGE e000 WITH : 'RUN_VALIDITY_TO_DATE can not be Less'(003)
                                    'Than System Date.'(004).
                EXIT.
             ENDIF.
             wa_rule-zrule_date_from  = zrule_date_from.
             wa_rule-zrule_date_to    = zrule_date_to.
             wa_rule-zrule_name       = zrule_name.
             wa_rule-zrule_id         = zrule_id.
             wa_rule-zrule_pref       = zrule_pref.
    ONCATENATE 'Where'  rule_for1a  operator1a  values1a
                 andor1  rule_for2a  operator2a  values2a
                 andor2  rule_for3a  operator3a  values3a
                 andor3  rule_for4a  operator4a  values4a
                 andor4  rule_for5a  operator5a  values5a
                 andor5  rule_for6a  operator6a  values6a
                 andor6  rule_for7a  operator7a  values7a
                 andor7  rule_for8a  operator8a  values8a
                          INTO wa_rule-zrule_clause SEPARATED BY space.
    In this code andor6(7,8,etc) has (and or)
    and operator8a(7a,6a etc) has (+,- <,>) and when i do enter these two get cleared. why does this happen?
    MY PBO code is
    MODULE status_1000 OUTPUT.
      SET PF-STATUS 'RULE'.
      SET TITLEBAR  '1000'.
    ENDMODULE.                 " STATUS_1000  OUTPUT
    *&      Module  fill_lists  OUTPUT
    For Filling List Boxes
    MODULE fill_lists OUTPUT.
    **********1
        name       = 'ANDOR1'.
        value-key  = 1.
        value-text = 'AND'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        value-key  = 2.
        value-text = 'OR'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        PERFORM LIST_BOX.
        CLEAR LIST.
    **************2
        name       = 'ANDOR2'.
        value-key  = 1.
        value-text = 'AND'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        value-key  = 2.
        value-text = 'OR'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        PERFORM LIST_BOX.
        CLEAR LIST.
    ************3
        name       = 'ANDOR3'.
        value-key  = 1.
        value-text = 'AND'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        value-key  = 2.
        value-text = 'OR'.
        MOVE value-text TO value-text.
        APPEND value TO list.
        PERFORM LIST_BOX.
        CLEAR LIST.
    etc.

  • Update order user status based on a custom check box value in web ui

    Hi Experts,
    I have a requirement to Update the  user status based on a custom check box value in web ui.
    This is needed at the followup for a SR, the component is BT116H_SRVO, Details View.
    I created a value node with 4 checkboxes, based on the check box value, the corresponding user status
    need to be updated.
    How can I reach to the order save functionality of SAP in EH_ONSAVE method, so that syatem can capture my check box value, along with other screen fields, and append the status parameter in Order maintain?
    or do I have to call order maintain in even handler for checkbox, which will affect performance .....
    Pls help.
    Regards,
    Lakshmi

    Hi,
    In your event handler you can use bol entity corresponding to status BTStatusH and change the user status.
    Best regards,
    Caíque Escaler

  • How to insert check box value in table?

    Hi all
    kindly help me how to insert check box value in database. what code i have to use as i am new in programing.
    thanx in advance

    Hi,
    There is no "Check box" in a table, a check box is a GUI (Graphical user interface) item.
    What you want is to store a boolean value in a table. For that you can use the varchar2(1) datatype and store Y or N. (or anything else)
    (you cannot define boolean as a datatype for a column).
    If you're using a front-end application like apex then it might be useful for you to read the documentation about chekc boxes :
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/check_box.htm#CHDDFBFH
    (for the rest if it's Oracle Forms then everything is already said).
    Edited by: user11268895 on Aug 17, 2010 10:44 AM

  • Accessing check box values in to WF

    Hi guys,
    i am looping through a list to create simple table with some check boxes ( <FieldLoop for='loopvar' in='variables.apps[*]'> ). i have specified checkbox field name - as "loopvar"
    <Field name='loopvar'>
    <Display class='Checkbox'>
    <Property name='label'>
    <ref>loopvar</ref>
    </Property>
    </Display>
    </Field>
    how shud i pull / get the list of chek boxes selected on the userform in to WF? will the form return a list? and how shud be the name field syntax shud i use a ":varibales."? im confused. please guide me with the best practice to declare and access check box values
    Edited by: tea_or_kapi on Nov 20, 2009 10:44 PM

    Hi Raju,
    Try this.  Create another dataprovider within your web template?  This new dataprovider refers to a similar query, but this query definition should restrict values CG1, CG2, CG3 and CG4.  Assign this dataprovider to your checkbox.  Then make sure the properties of the checkbox affect all other dataproviders.
    Also, if this list is static, you could create an HTML checkbox object coding the options (cg1, cg2, cg3, and cg4) programmatically.  Then add javascript code to produce the proper filtering based on the users' selections.
    Let me know what happens.
    Larry

  • FRM-40501 Error When Attempting To Change Check Box Value

    I am getting a FRM-40501 error when attempting to update/change a check box value. There are a few factors in my form setup that could be the problem, I will list them below:
    My initial problem was that my INSERT statement would not trigger to fire (based on an IF statement) when my check box value was not initially set to the value of 'Y', even though the initial value was set to 'Y' in the property palette (value when checked was set to 'Y' and value when unchecked was set to 'N'). So, to remedy this I placed a specific literal select of 'Y' and aliased it back to the name of my check box name in the data block query, like: SELECT 'Y' CB_SELECT_SCHOOL FROM user_schools. Then I changed the check box to a database item (value to Yes when it was No before my "SQL select cheat" in the data block query). This made the initial value 'Y' and satisfied my IF statement before my INSERT statement in my trigger. However, now I can not update the check box item.
    Does anyone know a better way to satisfy the initial value of my check box to 'Y', even though in the initial value parameter for my checkbox is set to 'Y' and forms is not really setting the initial value (when the check box is not set to a database item)?
    Thanks in advance.
    Kyle

    I have fixed my issue.
    I have reverted the check box to not be a database item, removed the "SQL cheat" of selecting 'Y' aliasing my checkbox name in the datablock SQL, and changed the initial value of 'N' in the check box property palette. This will force a change by the user making the check box value of 'Y', satifying my insert when-button-pressed trigger to fire and update the selected row.

  • Urg : okp2 transaction screen check box -msg maintence

    Hi Folks,
    thanks for your co-operation in every activity in SDN . My Requirement is in Transaction code OKP2 enter dummy date in controlling area ,fiscal year ,version and selecting plan tab in first screen its go to the second screen in this screen lot of period locks available . in this period locks are check or not depending upon project closed or nor . I want display message when Planning primary costs beside check boxes when it s checked at the movement display msg as
    '" u cant post any Planning primary costs here " . so any function module are table using this check boxes updates are checked or not . could please tell me pseudo code on this requirement as soon as possible.
    thanks
    suresh

    Hi,
    I actually did not understandd your question completely. but if defaulting a value is only your requirement. then below is the way to do it for a specific user.
    Normally for any user, if you want to default a value for any field. Then the parameter ID of that particular field will be given in the parameters tab of the users settings transaction SU01. Ask you security guy to help you out. and its respective value should be given there only. so that in SAP if this user opens and transaction and any of these fields are there in tha screen, they will be defaulted with the value given here in SU01.
    If you want it for all user: You can try searching for field exit or user exit for that respective screen.
    and not sure about this but you may even try using transaction variant( never used it, but you can give a try).
    Hope it is helpful.
    Thanks,
    Venkatesh.
    Edited by: venkatesh333 on Jul 19, 2011 11:11 AM

  • How to pass the check box values from one view to another view

    Hi Experts,
    I have a selection screen view which consists of check boxes.
    WBS System status.
    Release                      Completed                  Closed as 3 check boxes.
    Note : The above ones are check boxes.
    Based on the selection made by the user, those values needs to be passed to second view which retrieves the data and
    displays the data accordingly.
    At the same time if the user does not make any selection, then WBS System status should contain Released, Completed and Closed values and that needs to be sent to Second view.
    Kindly advise.
    Regards,
    Chitrasen

    hi ,
    make a attribute of type WDY_BOOLEAN to achieve this functionality
    u need to follow these steps :
    1 in side ur component controller , under the ATTRIBUTES tab , make 3 attributes say attr1 , attr2 and attr3 of type WDY_BOOLEAN
    2 create a context node , cn_check and 3 context attribute ca_check1 , ca_check2 and ca_check3 in ur first view for
    release , complete and close check boxes
    3 inside the DOINIT of ur 1st view , set the attributes attr1 , attr2 and attr3 to blank
    wd_comp_controller->attr1 = ' '
    wd_comp_controller->attr2 = ' '
    wd_comp_controller->attr3 = ' '
    4 inside the method , where u r validating , if the check boxes are checked or not , read the attributes ca_check1 , ca_check2 and
    ca_check3
      DATA lo_nd_cn_check TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_check TYPE REF TO if_wd_context_element.
        DATA ls_cn_check TYPE wd_this->element_cn_check.
        DATA lv_ca_check1 LIKE ls_cn_check-ca_check1.
    *   navigate from <CONTEXT> to <CN_CHECK> via lead selection
        lo_nd_cn_check = wd_context->get_child_node( name = wd_this->wdctx_cn_check ).
    *   get element via lead selection
        lo_el_cn_check = lo_nd_cn_check->get_element(  ).
    *   get single attribute
        lo_el_cn_check->get_attribute(
          EXPORTING
            name =  `CA_CHECK`
          IMPORTING
            value = lv_ca_check1 ).
    IF lv_ca_check1 EQ 'X' .
    wd_comp_controller->attr1 = ' X'
    wd_comp_controller->attr2 = 'X '
    wd_comp_controller->attr3 = ' X'

  • Use check box in function module

    Hallow I build a function module and I declare a check  box (check_str in tab import) that u can choose if u wont to see relat 027 push x else u can see 027 +034 my error is with definition of ceck_str it bring me an error that called field relat is unknown.  how can I declare it .maybe I am not do it write I do it in first time.  (relat is field from table hrp1001).
    regards
    DATA ceck_str TYPE string.
      if SWITC_HISTORY = 'X' .
      ceck_str = ( relat EQ '027' ).
      else 
      ceck_str = ( relat EQ '027' OR relat EQ '034' ).
      endif.
    This is my select
      SELECT objid sobid priox istat endda begda
      FROM hrp1001
      INTO CORRESPONDING FIELDS OF TABLE d_itab
    FOR ALL ENTRIES IN z_course_table
      WHERE otype = 'D'
       AND objid = z_course_table-objid
       AND sclas = 'P'
       AND ceck_str .

    Ur select statement looks like kind of a error ..Please check the last statement in select
    SELECT objid sobid priox istat endda begda
    FROM hrp1001
    INTO CORRESPONDING FIELDS OF TABLE d_itab
    FOR ALL ENTRIES IN z_course_table
    WHERE otype = 'D'
    AND objid = z_course_table-objid
    AND sclas = 'P'
    AND ceck_str = <b>'your Value'.</b>

  • Capturing check box value into internal table

    Hi all,
    I am displaying the output including check box through following internal table.
    The checkbox is displayed before every record.
      <b>LOOP AT it_qals.
        WRITE:/  it_qals-t_val  AS CHECKBOX,
               5 it_qals-werk,
              12 it_qals-prueflos,
              30 it_qals-matnr,
              50 it_qals-charg,
              62 it_qals-lagortchrg.
        hide: it_qals .
      ENDLOOP.</b>
    I selected some of the records through check the checkboxes. when i click the <b>PUSHBUTTON TRANSFER</b>, those selected records only should transfer. i don't know how to modify the internal table with latest checkbox values. Initially checkbox values are blank.
    Is there any solution except Function Module.
    i would appreciate an earlier reply.
    Regards
    Prabhu

    Hello,
    Create one more table and transfer your entries into new table.
    I have attached my code for you.
    Regards,
    Naimesh
    REPORT ZTEST_NP NO STANDARD PAGE HEADING.
    TABLES: MARA, MAKT.
    DATA: BEGIN OF IT_MARA OCCURS 0,
          MATNR LIKE MARA-MATNR,
          MAKTX LIKE MAKT-MAKTX,
          SEL,
          END   OF IT_MARA.
    DATA: IT_MARA1 LIKE IT_MARA OCCURS 0 WITH HEADER LINE.
    START-OF-SELECTION.
      SET PF-STATUS 'ZTEST'.
      PERFORM GET_DATA.
      PERFORM WRITE_DATA.
    TOP-OF-PAGE.
      PERFORM HEADER.
    AT USER-COMMAND.
      CASE SY-UCOMM.
      WHEN 'SELECT'.
        PERFORM GET_DATA_SELECTED.
        PERFORM WRITE_DATA_SELE.
      WHEN 'SELALL'.
        PERFORM SELECT_ALL.
        SY-LSIND = 0.
        PERFORM HEADER.
        PERFORM WRITE_DATA.
      WHEN 'DESEL'.
        PERFORM DESELECT_ALL.
        SY-LSIND = 0.
        PERFORM HEADER.
        PERFORM WRITE_DATA.
      ENDCASE.
    *&      Form  GET_DATA
    FORM GET_DATA.
      SELECT MATNR
             INTO TABLE IT_MARA
             FROM MARA
             WHERE MATNR LIKE 'IN10020%'.
      LOOP AT IT_MARA.
        SELECT SINGLE MAKTX
               INTO   IT_MARA-MAKTX
               FROM   MAKT
               WHERE  MATNR = IT_MARA-MATNR
               AND    SPRAS = SY-LANGU.
        MODIFY IT_MARA.
        CLEAR  IT_MARA.
      ENDLOOP.
    ENDFORM.                    " GET_DATA
    *&      Form  WRITE_DATA
    FORM WRITE_DATA.
      ULINE /(50).
      LOOP AT IT_MARA.
        WRITE: / '|' NO-GAP,   IT_MARA-SEL AS CHECKBOX NO-GAP,
                 '|' NO-GAP, (10) IT_MARA-MATNR NO-GAP,
                 '|' NO-GAP, (35) IT_MARA-MAKTX NO-GAP,
                 '|' NO-GAP.
      ENDLOOP.
      ULINE /(50).
    ENDFORM.                    " WRITE_DATA
    *&      Form  HEADER
    FORM HEADER.
      ULINE /(50).
      WRITE: / '|' NO-GAP, (1) ' ' NO-GAP,
               '|' NO-GAP, (10) 'Material'    NO-GAP,
               '|' NO-GAP, (35) 'Description' NO-GAP,
               '|' NO-GAP.
    ENDFORM.                    " HEADER
    *&      Form  GET_DATA_SELECTED
    FORM GET_DATA_SELECTED.
      DATA:  L_CNT TYPE I.
      DO.
        L_CNT = L_CNT + 1.
        READ LINE L_CNT FIELD VALUE IT_MARA-MATNR INTO IT_MARA1-MATNR
                                    IT_MARA-MAKTX INTO IT_MARA1-MAKTX
                                    IT_MARA-SEL   INTO IT_MARA1-SEL.
        IF SY-SUBRC = 0.
          IF IT_MARA1-SEL = 'X'.
            APPEND IT_MARA1.
            CLEAR  IT_MARA1.
          ENDIF.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.                    " GET_DATA_SELECTED
    *&      Form  WRITE_DATA_SELE
    FORM WRITE_DATA_SELE.
      PERFORM HEADER.
      ULINE /(50).
      LOOP AT IT_MARA1.
        WRITE: / '|' NO-GAP,   IT_MARA1-SEL AS CHECKBOX,
                 '|' NO-GAP, (10) IT_MARA1-MATNR NO-GAP,
                 '|' NO-GAP, (35) IT_MARA1-MAKTX NO-GAP,
                 '|' NO-GAP.
      ENDLOOP.
      ULINE /(50).
    ENDFORM.                    " WRITE_DATA_SELE
    *&      Form  SELECT_ALL
    FORM SELECT_ALL.
      LOOP AT IT_MARA.
        IT_MARA-SEL = 'X'.
        MODIFY IT_MARA.
        CLEAR  IT_MARA.
      ENDLOOP.
    ENDFORM.                    " SELECT_ALL
    *&      Form  DESELECT_ALL
    FORM DESELECT_ALL.
      LOOP AT IT_MARA.
        IT_MARA-SEL = ' '.
        MODIFY IT_MARA.
        CLEAR  IT_MARA.
      ENDLOOP.
    ENDFORM.                    " DESELECT_ALL

  • Default values in module pool screen issue

    Hello,
    I have 6 input fields in one of my module pool tab-strip. I can able to populate default values in 4 fields, but 2 fields are not showing default value on the screen. I am passing these default value for all 6 fields in PBO module of that screen. My question is, why only these 2 fields are not showing default values on the screen?
    Thanks,
    Shree

    Edgar,
    Thanks for the reply, I checked again, the screen fields and variables name is exactly same.
    Here is the sample code:
    MODULE status_2050 OUTPUT.
      gv_id_no_2050 = '200'.
      gv_matnr_2050 = '232020191'.
      gv_ebeln_2050 = '20019100'.
      gv_qty_2050 = 3.
      gv_bukrs_2050 = 'JP01'.
      gv_comments_2050 = 'my comments here'.
    ENDMODULE.

  • Passing check box values to WHERE clause

    Hi,
    I have created a Data block - 'CONTACTS' (Database data block)
    and has database item - 'Code', 'Descr'
    The number of records displayed is set to 5.
    Value When checked - 'Y'
    Value When Unchecked - 'N'
    Check box mapping of other values - 'unchecked'
    I am writing the code inside 'WHEN BUTTON PRESSED'. My main objective is to return the count of records based
    based on several conditions and one among them is CODE which is can be single or multiple based on the check box checked.
    The requirement is when i check one or multiple checkboxes, i should pass the 'Code' item values to the WHERE clause.
    Right now whenver i am trying to do so, only the current record value is copied to the WHERE clause.
    I have tried using basic loop but things havnt worked.
    Logic tried with basic LOOP
    BEGIN
    GO_BLOCK('CONTACT');
    IF :contact.cb = 'Y' THEN
    LOOP
    IF p_where is null then
    p_where := :contact.code;
    else
    p_where := p_where ||','||:contact.code;
    end if;
    exit when :system.last_record = 'TRUE';
    next_record;
    END LOOP;
    end if;
    MESSAGE ( 'p_where :'||p_where);
    MESSAGE (' ');
    END;
    And Even if i write the LOOP before the first IF, it return me the current record value and move to the last record.
    please guide me where am i wrong.
    Regards.
    Anoop.

    Try something like this:
    FIRST_RECORD;
    LOOP
      IF :contact.cb = 'Y' THEN
        IF p_where is null then
           p_where := :contact.code;
         else
           p_where := p_where ||','||:contact.code;
         end if;
       END IF;
      exit when :system.last_record = 'TRUE';
      next_record;
    END LOOP;
    -- END LOOP;
    MESSAGE ( 'p_where :'||p_where);
    MESSAGE (' ');
    END;

  • How to filter check box values in WAD.

    Hi Gurus,
    In my WAD i am having check box and the object name is defined as 0SEM_CGCOMP, it is a master data info object and having values like CG1,CG2,CG3....CG10. But i want to restrict the values to CG1,CG2,CG3,CG4 only. how can i filter the values?
    </object>
    </td>
              <td class="SAPBEXHLevel2"><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="CKBOX_CONS"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER_CHECBOX"/>
             <param name="DATA_PROVIDER" value="DP_1"/>
             <param name="GENERATE_CAPTION" value=""/>
             <param name="BORDER_STYLE" value="NO_BORDER"/>
             <param name="WIDTH" value="240"/>
             <param name="GENERATE_LINKS" value=""/>
             <param name="IOBJNM" value="0SEM_CGCOMP"/>
             <param name="SHOW_LABEL" value=""/>
             <param name="TARGET_DATA_PROVIDER_1" value="DP_1"/>
             <param name="HORIZONTAL_NUMBER" value="5"/>
             ITEM:            CKBOX_CONS
    </object></td>
    Thanks
    Raju.k

    Hi Raju,
    Try this.  Create another dataprovider within your web template?  This new dataprovider refers to a similar query, but this query definition should restrict values CG1, CG2, CG3 and CG4.  Assign this dataprovider to your checkbox.  Then make sure the properties of the checkbox affect all other dataproviders.
    Also, if this list is static, you could create an HTML checkbox object coding the options (cg1, cg2, cg3, and cg4) programmatically.  Then add javascript code to produce the proper filtering based on the users' selections.
    Let me know what happens.
    Larry

  • How to Select each check box values in a group of records

    Hi,
    I have a requirement in forms 10g. In that form there are 10 records are displaying each record has one check box is there if i click the check box on record number one and record number three and do some changes in the text field(adjustment field is number data type) then finally I want to see the total on one field called total amount.
    In this my question is how to select particular records in a group of records? and finally these selected records are inserted into one table.
    Because I am not able to fetch these records at a time.
    Is there any Array to define a record group to fetch each of them individually for example Rec[1],Rec[2]...like that if yes please suggest me the steps how to do this.
    Thanks in advance
    Prasanna
    Edited by: user10315107 on Dec 17, 2008 11:44 PM

    I'm sorry, but i didn't get your requirement in detail.
    Do you want to do the summing of the selected records in forms ? Or do you just want to know which records are selected and then process them?
    If you want to process the selected records in sql you could use an object-type to store the list of id's (of whatever primary key you use), loop over the block to fill it, and then afterwards process them.
    For this approach, first create an object-type in the database:
    CREATE OR REPLACE TYPE ID_LIST AS TABLE OF NUMBER;
    /Then, in forms you could do something like this to fill a list of id's:
    DECLARE
      lIds ID_LIST:=ID_LIST();
    BEGIN
      GO_BLOCK('MYBLOCK');
      FIRST_RECORD;
      LOOP
        EXIT WHEN :SYSTEM.RECORD_STATUS='NEW';
        IF :BLOCK.CHECKBOXITEM="CHECKEDVALUE" THEN
          lIds.EXTEND(1);
          lIds(lIds.COUNT):=:BLOCK.PRIMARYKEYITEM;
        END IF;
        EXIT WHEN :SYSTEM.LAST_RECORD='TRUE';
        NEXT_RECORD;
      END LOOP;
      -- Now you can use the object-list in SQL like :
      INSERT INTO MYNEWTABLE (cols..)
      SELECT (cols..)
        FROM MYOLDTABLE
       WHERE ID IN (SELECT COLUMN_VALUE FROM TABLE(lIds));
    END;Edited by: Andreas Weiden on 18.12.2008 18:17

  • Single or multiple check box values displayed in a text field

    My apologies, this may be a duplicate discussion.
    I'm using the following script to display the values of check boxes in a text field.  I would like the word "and" to separate the values if two check boxes are selected. If more than two boxes are selected I want the values to be separated by a comma and then the last value be separated by "and".  Example of two check boxes selected:  A and B.  Example of two or more: A, B, C, and D.  Can this be done?
    form1.page1.page1SF.programs::calculate - (JavaScript, client)
    //displays the values of check boxes named programCB
    var aChkBx = [];
    var vChecks = programCB.all;
    for (var a=0; a<vChecks.length;a++){
    if(!vChecks.item(a).isNull) {
    aChkBx.push(vChecks.item(a).rawValue);
    this.rawValue = aChkBx.join(", ");

    My apologies, this may be a duplicate discussion.
    I'm using the following script to display the values of check boxes in a text field.  I would like the word "and" to separate the values if two check boxes are selected. If more than two boxes are selected I want the values to be separated by a comma and then the last value be separated by "and".  Example of two check boxes selected:  A and B.  Example of two or more: A, B, C, and D.  Can this be done?
    form1.page1.page1SF.programs::calculate - (JavaScript, client)
    //displays the values of check boxes named programCB
    var aChkBx = [];
    var vChecks = programCB.all;
    for (var a=0; a<vChecks.length;a++){
    if(!vChecks.item(a).isNull) {
    aChkBx.push(vChecks.item(a).rawValue);
    this.rawValue = aChkBx.join(", ");

Maybe you are looking for