Counting Check Boxes with values

I have a sub-form where I gave each check box a value: sum(ICB6, ICB7, ICB11, ICB12, ICB16, ICB17, ICB21, ICB22), but what I want to do now is take this total and divide by the # of check boxes actaully checked. For example; if 2 of the boxes are checked my total is 7, then I want to divide it by 2 (the number of boxes checked) to get 3.5 as my score. I can not figure out how to make that happen?

If we assume that the Default value of your unchecked checkbox is zero, in the click/change event of the checkbox you can total the value of the checkboxes and divide it by 2.
Var total = (CheckBox1.rawValue + CheckBox2.rawValue+ CheckBox3.rawValue + ....) / 2
Thanks,
Bibhu.

Similar Messages

  • Check box with value in bsp page

    hi experts.
    i  m new to bsp.
    i  want to fetch one field from a ztable  with check box may be  possible field  have more than 4 values.
    checkbox1           .... value1
    checkbox2          ..... value2
    checkbox3          ..... value3
    checkbox4          ..... valule4
    but there is  not any field for checkbox in  ztable .
    now  when we select check box  depending on the selection of checkbox related values of field come into the 2nd page.
    example if i select check box 3 and 4 than values related to value 3 and value 4 come into the 2nd page .
    if any budy have  gud example of this case plz let me  know.
    points are guarented...

    PAGE ATTRIBUTE.
    itab_result     TYPE     ST_TV
    wa_result     TYPE     TY_TV
    LAYOUT.
        <% data: v_checkbox_id type string,
          sy_tabix type string.
    Loop at itab_result into wa_result.
    sy_tabix  = SY-TABIX.
    concatenate v_checkbox_id 'CHK' sy_tabix into v_checkbox_id.%>
    <td>
    <htmlb:checkbox id = "<%= v_checkbox_id %>"
            text = "<%= wa_result-stext %>"
          checked = "<%= wa_result-idx_data %>"
           />
    </td>
    <% ENDLOOP.

  • Oracle apex check box with update column

    hi to all:
    i have report emp.it contain data like eno,ename,sal,record .
    example:eno ename sal record
    100 a 100
    200 b 3000 going on...
    using this column i am making report by using apex and report contain one submit button also.
    1)in this report i am creating dynamic check box depend on eno..see my coding
    declare
    str varchar2(3000);
    begin
    str:='select htmldb_item.CHECKBOX(10,eno,DECODE(record,1,''CHECKED'')) "SELECT" ,eno,ename,sal ,record from emp where 1=1';
    return str;
    end;
    2)in process crated after  submit
    iam created pl/code like ..this code for
    declare
    i number;
    str varchar2(2000);
    emp_id number;
    begin
    FOR i in 1..HTMLDB_APPLICATION.G_F10.count
    LOOP
    IF HTMLDB_APPLICATION.G_F10(i) is not null then
    SELECT htmldb_application.G_F10(i) INTO emp_id from dual;
    --insert into my_log values(emp_id);commit;
    update emp set record=1 where eno=emp_id ;
    commit;
    else if HTMLDB_APPLICATION.G_F10(i) is null then
    update emp set record=0 where eno=emp_id ;
    commit;
    else
    null;
    end if;
    end loop;
    end;
    my requirenent:
    a)if check box checked then -update -record column -1
    b)if check box uncked then -update - record column -0
    in process coding--
    eno alway is not null only..
    so i want to do check box with update the record column..like this
    a)if check box checked then -update -record column -1
    b)if check box uncked then -update - record column -0
    pls give solution.
    output i want like this example:
    chebox eno ename sal record
    checked(X) 100 a 300 1
    checked(x) 200 b 300 1
    next time i am trying to make uncheck first row like
    chebox eno ename sal record
    unchecked 100 a 300 0
    checked(x) 200 b 300 1

    I'm not really sure what your problem is but if you are trying to update/save data when a checkbox is checked I would use javascript to call an application process to do the update/save.
    /Daniel

  • How to add a list box with values for a ztable in SM30

    Hello Gurus,
                    I had created a table maintenance for Ztable and added many extra functionality to that. Now i would like to add a list box or check table for a field. Can i do that with out Regenerating my table maintenance. Please help me its..very urgent.

    Have referred this domain to the data element, this should be the Field type in ur table for the particular field.
    Eg: <b>SE11 > table name > fields-ZTEST > fieldtype-ZZTEST</b>
    ZZTEST in the data element > create a domain for this data element and in that specify teh value range.
    Save and activate it.
    Make sure that u regenerate teh table maintenance generator else u cant see the changes.
    Now if u press F4 u can see only thevalues specified, also u will see only the list box with values in SM30.
    Try this,please let me know if u face any difficulties.

  • Check box with redirect

    Hi :
    In application express as we have select withredirect can you include check box with redirect
    please suggest
    Thanks
    sudhir

    Sudhir,
    Check whether the following javascript helps you.
    function go() {
    var abc = '';
    var radioLength = document.wwv_flow.p_v05.length;
    var retVal = '';
    if(radioLength == undefined)
              if(document.wwv_flow.p_v05.checked)
                   retVal = document.wwv_flow.p_v05.value;
              else
                   return "";
    for(var i = 0; i < radioLength; i++) {
              if(document.wwv_flow.p_v05.checked) {
                   retVal = retVal + '4' +document.wwv_flow.p_v05[i].value;
    retVal = retVal.substring(1, retVal.length);
    if(retVal=='Y')
    var answer = confirm("Do you want to move to the page a ? If yes,press OK to move to a , CANCEL to stay here");
    if (answer == true)
    alert('Please wait while we transfer you to the Consulting Win Story template');
    location.href="url a ";
    else
    return"";
    if(retVal=='N')
    alert(' Thank you');
    location.href="same page url";}
    here i have used the option button to move to another page and stay in the same page.
    If you want to submit the page for any value,
    you can write doSubmit( submitbuttonname);
    call this function on the option button, in html form element attributes.
    name ="p_v05" onClick="go()"
    Message was edited by:
    archana

  • How to create a check box with an X

    Hi,
    How do you create a check box with an X as apposed to a tick?
    Thanks

    Go to the check box's properties and in the Options tab choose "Cross" as the check box style.

  • Check Box With Tick Mark on Sap Script

    Hello All,
    We need to add a check box with tick mark on Sap Script.Please can anyone let me know how can we add it.
    Regards
    Amruta

    hi amruta,
    The soluti as an image into on to your problem can be to use the symbol icon as told , but this may show in preview not in print.
    I too faced the same problem.
    So what i had done is created a new window with the diemnsions of the chekc box with border thcikness 8 tw and inside that window place a checkmark symbol.
    if this checkmark symbol also does not show up in print preview/  doesshow in print preview and not in print then you can scan a chekcmark image and upload it into business document server as a BMP/ TIFF image and use this image in your checkbox window.
    Hope this solves your problem.
    Warm Regards
    Venugopal.T

  • Check boxes with submit

    Hi
    Is it possible to have check boxes with submit in APEX like selected list with submit.
    The requirement is as follows
    we have different systems and under each system there are number of applications.
    The systems and applications should appear as checkboxes to select.
    If I select a particular checkbox for a system, list of applications under that system should appear in form of checkboxs.
    secondly, I should also have an option for selecting multiple systems and multiple applications.
    Can anyone advice me how this can be achieved.
    Thanks.

    in HTML Form Element Attributes of your CHECKBOX put:
    onClick="javascript:doSubmit(CHECK_BOX_CLICKED');"
    Hope this helps...

  • Collecting values from multiple check boxes with same name

    Hi,
    I have a jsp-page with one form with several check boxes sharing the same
    name (but with different values).
    Can I collect the values in an array/list or something?
    /jsp-beginner and google ain't my friend in this case

    this answer not good enough for you?

  • Need help writing formula to count checked boxes

    This is probably a no brainer for you experts but I am making a spreadsheet for scoring a test and I have put in check boxes. Beside in the adjacent cells to the cells with check boxes I have placed the values that correspond to those check boxes. I want to be able to format a cell to do several things.
    First I need to link the adjacent values to the check box cell that it corresponds to.
    Then I need to format a cell to
    1. Count the number of boxes that have been checked.
    2. Display the values that are linked to cells if the total is 10 or under
    3. Display text that relates to the values that are linked to the cells.
    Your help is greatly appreciated.
    Shane

    The Pickler wrote:
    In answer to your first question. Each question is multiple choice and my layout is chosen to mimick the test itself for easy scoring.
    So I take this to mean that it is only valid to have one check per row.
    Second, if there are more than 10 I want it left blank.
    Right now, it is simpler to have this behave the the other way, in that it eliminates a complicating special case.
    So here's a screen shot of what I have on this:
    !http://img227.imageshack.us/img227/6263/questionairesummarywo1.png!
    Let me discuss this and explain some of the changes I made to your initial attempt.
    (1) Since I presumed one check per row, you can see in the "Responses" table I switched over to this type of data entry. This has several advantages and, most importantly, was key in clarifying my thoughts downstream. It does not permit the invalid multi-check per row and can be more readily entered via keyboard. The use of A,B,C,D for the choices is arbitrary; they could be 1,2,3,4 or any other distinct set of 4. If you ever want to simultaneously evaluate several questionnaires this can be accommodated better by adding additional columns to this table.
    (2) The references associated with each question's choices are encoded in the "Key" table. This table can be squirreled away on another sheet dedicated to questionnaire configuration and remain out of harm's way while entering response data. The column headings must correspond with the answer designations used in the "Responses" table.
    (3) The "Tally" table is purely for the computation of the "Summary". It allows both the number of each type of reference to be computed and the listing of the references. Since it is purely computational, it should be hidden away on another sheet.
    (4) The "Descriptions" table is where the association of references and the statements is expressed. Since, like the "Key" table, it is likely edited infrequently, this too should be squirreled away on the questionnaire configuration sheet.
    (5) Finally, the "Summary" table display the counts of each reference type and zero to ten of the references and associated statements. Currently, this shows as many as the first 10 because, as stated above, it avoids a complicating special case and is displayed elegantly via this filtered table (which avoid displaying the unused reference rows). The count is always the total count, even if it is exceeds ten.
    Third, since I don't know the first thing about writing formula's I guess I need to have you hold my hand through this process or teach me some basics. Please.....if your kind and willing enough to do so.
    As there are more than a couple of formulas here, the least time consuming way to explain them is simply to upload this Numbers document to a place you (or anyone else who is interested) can download it. Explore it for yourself and feel free to ask any questions you have about it or how to modify it to better suite your needs.
    You will find that the file contains three sheets. What is presented here resides solely on the third sheet. The first two sheets can safely be ignored/deleted, but I have left them in as they represent two earlier attempts (the first only partial, the second, more complete) at a solution. Some may find them interesting, perhaps containing good techniques for other problems.
    [Questionnaire Summary Numbers Document|http://www.mediafire.com/?1125t9nm9xm|Click to download a zip archive]
    This will take you to a page that will allow you to download the file directly (I apologize for any of this free hosting site's advertisements that you might find offensive). Click on the link in the yellow region on the mid-left part of the page. If all goes well, the zip will download and automatically unarchive into the Numbers document "QuestionnaireSummary.numbers". Let me know if you have trouble.

  • Binding a Check Box with a User Defined Field

    Hi everyone,
    i v created a user defined field (U_CheckPro)in the system table "OITM" with two values: Y for Yes and N for No. In relation to that i v also created a check box on the form "150" and would like to know how can i bind my checkbox with  my user defined field properly.
    The user would be than able to enable or disable the check box for each item (article). The user setting schould be than be active and valid in sbo-business logic, each time an item is selected. (for example in case of sales order ID 133, "OINV").
    Any helfpul hints? Samples would be welcome as well.
    Thanks and regards
    Alban

    > First of all you should remove the valid values
    > because checkboxes does not work with valid values...
    > Just give a default value.
    Hi Rasmus,
    thank you very much for your helpful hint. I guess my problem is solved by that - nevertheless here is my complete code sequence once again in case of possible errors.
    I would appreciate any additional suggestion for improvement of the same.
    Thanks and regards
    Alban
    >>>
    Private Sub AddItem()
            ' Test UserSource
            oForm.DataSources.UserDataSources.Add("U_CheckPro", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1)
            oItem = oForm.Items.Item("122")
            ' Adding a Static Text item
            oNewItem = oForm.Items.Add("StaticTxt2", SAPbouiCOM.BoFormItemTypes.it_STATIC)
            oNewItem.Left = oItem.Left + 20
            oNewItem.Width = 100
            oNewItem.Top = oItem.Top + 12
            oNewItem.Height = 25
            oNewItem.FromPane = oItem.FromPane
            oNewItem.ToPane = oItem.ToPane
            oNewItem.LinkTo = "CheckBox1"
            oStaticText = oNewItem.Specific
            oStaticText.Caption = "Test_Caption"
            ' Adding a Check Box item
            oNewItem = oForm.Items.Add("CheckBox1", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
            oNewItem.Left = oItem.Left
            oNewItem.Width = 20
            oNewItem.Top = oItem.Top + 15
            oNewItem.Height = 19
            oNewItem.FromPane = oItem.FromPane
            oNewItem.ToPane = oItem.ToPane
            oNewItem.DisplayDesc = False
            oCheckBox = oNewItem.Specific
            'binding check box to source
            oCheckBox.DataBind.SetBound(True, "OITM", "U_CheckPro")
        End Sub
    >>>

  • Check box with Boolean data type is not behaving properly

    Hi,
    I create a sample application with one entity driven view object with two attributes. One is of String data type [Value will be Y/N] and another (transient) attribute with Boolean data type. I planned to bind this boolean data type attribute to UI. I overridded the view row impl class and included setting of boolean attribute inside the setter of String attribute. Also in the getter of boolean attribute, added code to check the string attribute and return true/false based on that. Everything is working fine in application module tester. But when i test the same in view controller project in a page, it is not working. Always Check box component is not checked eventhough when i explicitly check it.
    [NOTE: I have given the control hint of Boolean attribute as check_box. Also i don't want selected/unselected entries in the page def file. That's why followed this approach]
    Have i missed out anything? Why this behaviour.
    Thanks in advance.
    Raguraman

    what is the value that is going in when u check it.. did u debug it.. is the viewRowimps setter and getter getting called.. and is it having the right value set and got.. and ur sure that ur using selectBooleanCheckBox..
    ur binding the checkbox to the transient value right??

  • How to link a check box with a text field

    Hello, I'm looking for some help with my PDF form. If a check box is checked then I would like to force the user to input a value a related text field. First, is this possible and if so can anyone give me some guidance on how to achinve this. I'm currently using LiveCycle 8.0..
    Thanks for your help...

    Go to the check box's properties and in the Options tab choose "Cross" as the check box style.

  • Fixed Vendor check box with BAPI "BAPI_SOURCEDETERMIN_GETSOS"

    Hello gurus,
    I am new to BAPI & I need to update the source list(ME01) with agreement no., item, unit & fixed vendor check-box.
    My question to all that the fixed vendor check box will be checked or not if i use the BAPI BAPI_SOURCEDETERMIN_GETSOS?
    Thanks & regards,
    Feluda

    Hello,
    The coding you've made regarding the check/uncheck seems fine...
    However, check again logic-atp_wrkmod...
    As far as i've seen, the allowed values are space and 'A' .
    The value 'X' is not in the domain range.
    Hope it helps!!

  • How to change the check box with the push button in itrator table rows

    Hi all,
    I want to change the check box of the itrator table rows with push button/ some thing better as to give
    the table view more good look and user friendly.
    Does any one has tried any other option in table view in place of check box
    Thanks
    Bhagat

    There are various objects which you can create via iterators. Please see the application SBSPEXT_TABLE for more details.
    DATA: lo_text      TYPE REF TO cl_htmlb_textview,
            lo_ddlb      TYPE REF TO cl_htmlb_dropdownlistbox,
            lo_input     TYPE REF TO cl_htmlb_inputfield,
            lo_button    TYPE REF TO cl_htmlb_button,
            lo_chk_bx    TYPE REF TO cl_htmlb_checkbox.
      row_ref = p_row_data_ref.
      CASE p_column_key.
        WHEN 'EFF_DATE'. " Input field
          CREATE OBJECT lo_input.
          lo_input->id       = p_cell_id.
          lo_input->type     = 'DATE'.
          lo_input->showhelp = 'TRUE'.
          lo_input->width    = '60'.
          lo_input->invalid  = 'true'.
          p_class            = `ao`.
          lo_input->value     = get_column_value( p_column_key ).
          p_replacement_bee = lo_input.
        WHEN   'NEW_LOC'. " Drop down list box
          CREATE OBJECT lo_ddlb.
          GET REFERENCE OF gt_persa INTO lo_ddlb->table.
          lo_ddlb->id                =  p_cell_id.
          lo_ddlb->nameofkeycolumn   = 'NAME'.
          lo_ddlb->nameofvaluecolumn = 'VALUE'.
          lo_ddlb->selection         = get_column_value( p_column_key ).
          lo_ddlb->selection  = 'DUMMY'.
          p_replacement_bee          = lo_ddlb.
        WHEN 'MON' . " Check box
          CREATE OBJECT lo_chk_bx.
          lo_chk_bx->id = p_cell_id.
          lo_chk_bx->checked =  get_column_value( p_column_key ).
          p_replacement_bee  = lo_chk_bx.
        WHEN 'NEW_MGR_SRCH'. " Button
          CREATE OBJECT lo_button.
          lo_button->id            = p_cell_id.
          lo_button->text          = 'Search Mgr'.
          lo_button->onclientclick = 'script'.
          p_replacement_bee = lo_button.
        WHEN OTHERS. " Text
          CREATE OBJECT lo_text.
          lo_text->id       = p_cell_id.
          lo_text->wrapping = 'FALSE'.
          lo_text->text     = get_column_value( p_column_key ).
          lo_text->design   =  'STANDARD'.
          lo_text->textcolor = 'POSITIVE'.
          p_replacement_bee = lo_text.
      ENDCASE.
    Thanks
    A

Maybe you are looking for