Multiple Inserts based on check box?

I have an insert form that depending on if checkboxes are
checked, inserts the data. How can I insert a record for the number
of check boxes checked?
Example:
CB 1 = Checked
CB 2 = Not Checked
CB 3 = Checked
So I need to insert a record for CB 1 and CB 3. How can I do
this?
What I'm doing is tying a sales lead to the sales man
selected. I'm using check boxes because I figured it was easiest
but I'm open to suggestions.

In your example, CB 1 and CB 3 are checked. But your
explanation states you need to insert a record for CB 1 and CB 2.
What am I missing?
Keep in mind that you will not see the variable FORM.CB2,
since unchecked checkboxes to not pass their name to the action
page. Maybe the code below will help. By naming all the check boxes
the same, you receive a comma-delimited list of the values of only
the checked checkboxes. You can then put this in a list loop and
update your database.

Similar Messages

  • Need to change the LOV field based on checked box selection in OAF page

    Dear ALL,
    I have a requirement as below:
    I have a custom OAF page having a lov  field which is mandatory, a check box and a two text fields.
    So based on LOV value selection i am defaulting two text field value automatically.
    So my requirement is when user selects the check box automatically the LOV field should be non mandatory and user can insert in values to the lov field and text field and submit it.
    SO basically based on check box field selection i need to make the lov field in such a way it should accept all the values what user enters instead of check the query added in VO behind the LOV.
    Please suggest me some pointers to achieve this requirement.
    Thanks
    Deb

    hi,
    in PFR use:
    if ("checkevent".equals(pageContext.getParameter(EVENT_PARAM))) 
                     HashMap hashMap = new HashMap();
                     String checkboxval=pageContext.getParameter("item2");
                  hashMap.put("checkboxval",checkboxval);
                    pageContext.setForwardURLToCurrentPage(hashMap ,
                    true, // retain the AM
                    OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
                    OAWebBeanConstants.IGNORE_MESSAGES);
    and in PR use:
    if((pageContext.getParameter("checkboxval'))!=null)
    OAMessageLovInputBean lovInputBean=(OAMessageLovInputBean)webBean.findIndexedChildRecursive("item3");
          lovInputBean.setRequired("false");
    try it
    Regards
    Mahesh

  • GR based IV check box suppressed - Extended Classic Scenario

    Hello Folks,
    How are you doing today ?
    We are working in SRM 5.0 Extended Classic scenario.
    When created the Local PO in SRM with GR Based IV Check box active, the
    follow-on back-end Purchase order is generated without this flag. In
    other terms, system is creating the follow-on ECC PO without GR Based
    IV check box active. As a result, we are unable to run the ERS cycle.
    Back-end system in above scenario is ECC 6.0. And vendor settings are
    maintained with GR based IV flag on in both ECC and SRM.
    Kindly advice.
    Thank you for your assistance !

    Hi Ravi and Yann,
    Thank you for your inputs. OSS note-956083 can not be applied in my case due to the hight system version (patch level 550).
    I have already raised this issue to SAP, but in the lack of proper infrastrucure SAP can not access the system. (BASIS guys are still struggling with it)
    Well...let me give you recap-
    We have not activated nor implemented any BAdi so far (Vanila SRM 5.0 EC scenario) PO creation for goods is working fine and as desired. But when it come across with PO with limit item or services, system throws an error as -
    "PO 5100000263: Service-based invoice verif. requires GR "NO" or G R-based invoice verif."
    Would deeply appreciate if you guys can share insight on this issue.
    Thank you for your assistance!

  • GR Based IV check box

    Hi. I need help in controlling the GR Based IV check box in creating the PO.
    We normally set this in the vendor master. But then, How can I set the GR BASED IV checkbox base on the PO document type that will be used?
    Let say I want all sap standard types of PO to be GR Based and some Z type PO to be not a  GR based IV PO.  Is this possible?
    Is there a User-Exit for this?

    HI,
    Since you want to set the GR based IV to set for all Standard Purchase order- at doc type level.
    So the first thing is the vendor master setting which you are already doing.
    Second you can also do it by the info record .by creating info record for all vendor and material /Material Group ..we can control the GR IV indicator
    Third  thing is Controlling it by the screen layout.
    SPRO-Material Mangement-Purchasing- Purchase order-Define doc types
    here in the definition of Doc type ,attach a screen layout.
    SPRO-Material Mangement-Purchasing- Purchase order- Define screen Layout at doc type level.
    in this Screen layout in the tab --GRIR control. make the GR based invoice as mandatory,so that it cant be skipped while created or change of PO and user will check it even if it is missed out.
    hope so it helps
    Regards
    Anjanna

  • Default settings for gr based ir check box for asset PO

    dear experts,
                  in vendor master record in purchasing data tab i have checked gr based iv check box, and hence whenever i am creating a Po with X vendor for material system is automatically  checking the check box in po for gr based iv but with the same vendor X if i am creating a PO for Asset itis not checking the gr based iv check box by default.
           can you pls tell me where the default setting for gr based  iv lies for the asset procurement.
    thanks
    ujwal

    HI Ujjwala,
    The setting in spro in Acct assigment,  u are talking about is GR Receipt or Invoice Receipts.
    These are not GR Based Invoice Verification.
    GR based Invoice Verification comes from either ur inforecords or vender master.
    if u check or uncheck these in spro in acct assigment, then it will comes ur Deliver Tab not ur invoice Verification Tab.
    one thing more, if u make it mutiple Acct assigment, then it will be Non Valuated G/R Based IV.
    Hope Clear U !
    REgards,
    Pardeep Malik

  • Updation/insertion of multiple records simultaneously using check box

    Hi,
    I am using Jdev11.1.1.2.0 version. I have the following scenario.
    There is a table in the view.At run time, I need to select multiple records and update those records in the database. So i took check Box as a column in the table.*(I did not associate check box to any of the attributes (columns) in the table.)* After running the application, I selected multiple records using checkbox and submitting them. The check box is returning value as 'false' even for the selected records also instead of 'true'. Because of this we are facing the issue in updating only the selected records. Please suggest your valuable inputs.
    I have written the following code in the backing bean to get the selected rows.
    BindingContainer bindings =BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding dcIter= (DCIteratorBinding) bindings.get("PttDeliverabvleTrackerEOView2Iterator");
    RowSetIterator depRSIter = dcIter.getRowSetIterator();
    depRSIter.setRangeSize(depRSIter.getRowCount());
    Integer key = depRSIter.getRowCount();
    System.out.println("No of rows is "+ key);
    int rowIndex =0;
    for(int i =0; i<key; i++){
    PttDeliverabvleTrackerEOViewRowImpl row = (PttDeliverabvleTrackerEOViewRowImpl) depRSIter.getRowAtRangeIndex(i);
    System.out.println("Check box value2 "+ this.getSbc1().isSelected());
    if(this.getSbc1().isSelected()){
    rowIndex = i;
    System.out.println("Row Index: "+ rowIndex);
    Please let me know if it is it possible to associate a checkbox to any of the attributes while dragging and dropping the table in the view and update the records?
    I tried selecting the option 'Row Selection' while dragging and dropping the table and changed the property RowSelection->multiple. But it is not serving the purpose of updating multiple records.
    Please suggest if there is any other solution to update multiple records.
    Regards,
    Sreelatha.

    Hi,
    if you added checkboxes to a table, then at runtime the checkbox is stamped, which means that a call to this.getSbc1().isSelected() just returns the state of the last checkbox that is rendered. I don't want to go into the details of ADF Faces table rendering here, but point yu to a blog article that does what you are aiming for using ADF BC: http://sameh-nassar.blogspot.com/2009/12/use-checkbox-for-selecting-multiple.html
    Frank

  • Hiding text box based on check box checking

    Hello,
    I have a jsp in which based on whether the check box is checked or unchecked I want to hide or show a text box. I am including the text box in a div tag & calling a javascript function to set the style of the div to hidden or shown based on whether the check box is checked or not. although i am getting the correct values in the alerts the text box is not getting hidden.
       <td class="label"><label for="chk1"><gbms:message key="lblSearchforDeletedCustomer"/>:</label></td><td class="input">
                  <html-el:checkbox property="chk1" value="N" tabindex="3" onclick="javascript:checkboxClicked(document.forms['formCustomerOrVehicleMaintenance'])" onfocus="fnShowError(document.formCustomerOrVehicleMaintenance.chk1);"></html-el:checkbox> <gbms:message key="chek"/> 
                                 </td>
                                 <div id="delDateDiv" style:hidden>
                            <td class="label"><label for="txtDeleteDate"><gbms:message key="lblDeletedAsOf"/>:</label></td><td class="input">
                 <html-el:text property="txtDeleteDate" size="6" maxlength="40" tabindex="3" onchange="fnChanged()" onfocus="fnShowError(document.formCustomerVehicleMaintenanceDelete.txtDeleteDate);"></html-el:text> <a href="#" onclick="cal1xx.select(document.forms[0].txtDeleteDate,'anchor1xx','MMddyy'); return false;" name="anchor1xx"><img src="<%=request.getContextPath()%>/css/common/calendar.gif" border="0" style="cursor: hand"></a><gbms:help jsp="customerVehicleMaintenanceDelete" module="admin" languageCode="<%=request.getLocale().getLanguage()%>" field="DeletedAsOf"/>
                        </td></div>javascript function being called..
    function checkboxClicked(aThis)
                        var aform = document.forms['formCustomerOrVehicleMaintenance'];
                        var aDiv = document.getElementById('delDateDiv');
                        alert(aDiv.style.visibility);
                        alert(aDiv.innerHTML);
                        alert(aform.chk1.checked);
                        if(aThis.chk1.value == true)
                             aform.txtDeleteDate.value = '';
                             aform.txtDeleteDate.disabled = false;
                             aDiv.style.visibility = 'visible';
                        else
                             aform.txtDeleteDate.value = '';
                             aform.txtDeleteDate.disabled = true;
                             aDiv.style.visibility = 'hidden';
                   }

    in my javascript function the value returned is true when checkbox is checked & false when it is unchecked. visibility is also giving correct value in the alert. but still field is not hiding
              function checkboxClicked()
                        var aform = document.forms['formCustomerOrVehicleMaintenance'];
                        var aDiv = document.getElementById('delDateDiv');
                        alert(aDiv.style.visibility);
                        alert(aform.chk1.checked);
                        if(aform.chk1.checked)
                             aform.txtDeleteDate.value = '';
                             aform.txtDeleteDate.disabled = false;
                             aDiv.style.visibility = 'visible';
                             alert("inside if");
                             alert(aDiv.style.visibility);
                        else
                             aform.txtDeleteDate.value = '';
                             aform.txtDeleteDate.disabled = true;
                             aDiv.style.visibility = 'hidden';
                             alert("inside else");
                             alert(aDiv.style.visibility);
                   }

  • Populate drop-down lists based on check box selections

    Hi. I'm creating a Service Work Order form. At the top, there are several check boxes for the various services we provide, under that , more text fields, drop downs and checkboxes to elaborate on those services, and then at the bottom, fields for pricing.
    I'd like the top half of the form to drive the pricing info that is available or that auto-populates at the bottom.
    Ideally, I'd like to make the pricing specific based on 3 things:
    the service checkbox
    the client
    and the details on that service
    For example:
    If Client XYZ wants Service A that includes subservice B
    $123 should show up on the bottom half in the field for that service
    If Client ABC wants Service B that includes subservice C
    $456 should show up on the bottom half in the field for that service
    Does that make sense?
    I've been unable to get code to work in either the calculate and pre-Open options
    I first tried calculate and used this code (which was just a guess on my part)
    if (CheckBox1 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 50
    elseif
    (CheckBox2 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 50
    elseif
    (CheckBox5 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 55
    elseif
    (CheckBox6 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 55
    elseif
    (CheckBox7 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 50
    elseif
    (CheckBox8 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 50
    else
    $.rawValue = 0
    endif
    That didn't do anything but give me an error about "and"
    So I tried putting code in pre-Open:
    // clear the dropdown displayed value and items
    this.rawValue = null;
    this.clearItems();
    // repopulate the items based on the checkboxes
    if(offshore.rawValue == 1)
        this.addItem("$40.00", "offshore_001");
        this.addItem("$45.00", "offshore_002");
        this.addItem("$50.00", "offshore_003");
    if(inland.rawValue == 1)
        this.addItem("$40.00", "inland_001");
        this.addItem("$45.00", "inland_002");
        this.addItem("$50.00", "inland_003");
    I got no error but nothing populated and the drop-down was, in effect, disabled.
    Any help would be appreciated.
    Thanks!

    Gavin,
    This sounds like an issue that is not related to JHeadstart. To simplify the test case, you could create a simple drag-and-drop ADF application without JHeadstart and see if the same problem occurs there.
    Your suggestion that it is related to the where clause seems likely. Please find out what kind of object USER_ENV is, and how it is initialized. Maybe this initialization is skipped when bouncing the application.
    What happens if you perform the query in SQL*Plus, without doing anything about the USER_ENV?
    Maybe you should ask the Oracle Applications discussion forum...
    kind regards,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • Deletion of single or multiple rows by selecting check boxes?

    Hi ,
    I want to delete a row or no of rows  in a table by selecting the check boxes.COuld any one suggest me how to do this?
    Regards,
    Ram

    Following is the JavaScript sample you may have to tweak the code to fit your situation....
    // Invoke the Instance Manager to remove the current instance of the detail subform.
    _<SubformName/RowSOMName>.removeInstance(index of the object to remove)
    //_Section2Detail.removeInstance(this.parent.index); //in my case I have a delete button next to each row when clicked that will pass the index of the parent(row index as it is part of that row).
    // Invoke the recalculate method to update the form calculations.
    xfa.form.recalculate(1);

  • Multiple Record Selection through Check Boxes

    Using 10g Forms. I have a tabular data block with 10 record displayed one item is a checkbox. each check box has diffrent id like (1,2,3,....) now with a button press i want to get all the records checked (or selected).
    i always get last check box value etc :(
    Thanx in advance

    Hello,
    You have to loop through your records:
    go_block('the_block');
    Fisrt_record;
    Loop
      -- check the checkbox value ;
      exit when :system.last_record  = 'TRUE' ;
      next_record ;
    End loop;
    First_record;
    ...Francois

  • Set variable in main mxml based on check box selection in another mxml

    I have a two mxml, In one of my mxml I have a checkbox, on checkbox_click event I want to pass some value to my main.mxml.
    Using this value I want to toggle the visibility of map layer in main.mxml.
    So far I have declared a bindable boolean variable in my main application mxml.
    And written a function to set the value of this boolean variable depending on some other variable in the second mxml. This second boolean variable is set depending on the checkbox selection in second mxml. now I do not understand from where should I call this function so that everytime checkbox is checked or unchecked value of my bindable boolean variable (declared in main app) changes.
    Is there any other way of doing this?
    Thanks in Advance

    This makes it even easier:
    -------------- MyComp.mxml ----------------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
        <![CDATA[
          import mx.collections.ArrayCollection;
          import mx.events.ListEvent;
          [Bindable] public var compBool:Boolean = false;
          private function toggleVisibility(evt:ListEvent):void{
            if(cmbx.selectedLabel == "show"){
              compBool = true;
            }else{
              compBool = false;
        ]]>
      </mx:Script>
      <mx:ComboBox id="cmbx" dataProvider="{new ArrayCollection(['hide', 'show'])}"
        change="toggleVisibility(event)"/>
    </mx:VBox>
    -------------- mainapp.mxml -------------
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      xmlns:comp="*">
      <comp:MyComp id="compObj"/>
      <mx:Label text="Map Component" visible="{compObj.compBool}" includeInLayout="{compObj.compBool}"/>
    </mx:Application>
    If this post answers your question or helps, please mark it as such. Thanks!
    http://www.stardustsystems.com
    Adobe Flex Development and Support Services

  • Query based on check box selection

    Hi,
    Can anyone tell me how to write query or what is the way for the following problem
    i have 2 regions in my report 1st region is the html one which has multiselect depending upon selection from the multiselect when user clicks submit
    another region that is the interactive report that is displayed.
    can anyone tell me how to query for ir for the same and what other things i need to do?
    Thanks and Regards,

    keny_01 wrote:
    Hi,
    Can anyone tell me how to write query or what is the way for the following problem
    i have 2 regions in my report 1st region is the html one which has multiselect depending upon selection from the multiselect when user clicks submit
    another region that is the interactive report that is displayed.
    can anyone tell me how to query for ir for the same and what other things i need to do?
    Thanks and Regards,Not sure I quite understand... when you say multiselect - is that the checkbox?

  • Check boxes to hide or display multiple subforms

    I have been using radio buttons to display subforms individually. Now I need to have multiple subforms displayed based on check boxes, but I have never done this before. Any help would be greatly appreciated. Just FYI, I used the following for the radio buttons:
    if(this.rawValue==1)
    WaterSysImpSF.presence="visible";
    else
    WaterSysImpSF.presence="hidden";
    etc...
    Thanks.

    Hi Pradeep,
    1. Create a Pushbutton or set a PF status.
    2. u can create input fields without a subscreen.
    3. u can code to hide the input fields by using
         LOOP at Screen.
            case screen-fieldname.
               when <fieldname1> or <fieldname2>..
                  Screen-Invisible = 1.
                  Screen-active = 0.
             endcase.
         ENDLOOP.
    4. when u press the button.
    i. Catch the Ok code
    ii. Unhide the input fields.
         LOOP at Screen.
            case screen-fieldname.
               when <fieldname1> or <fieldname2>..
                  Screen-Invisible = 0.
                  Screen-active = 1.
             endcase.
         ENDLOOP.
    Regards,
    Raj.

  • If GR based IV checked for items without excise duty, MIRO posting hanging.

    Iam working in a client location, one of client business scenario is MIRO posting without excise (Only VAT or CST). for this case i have not maintained vendor excise details in J1ID.
    When a MIRO with reference to PO for an item ticked for "GR based IV" is posted, the system is hanging or is not posting and not issuing any message. Specifically for an item to which exicse is not applicable.
    please send your expert advice on this
    Edited by: J Sridharan on Mar 30, 2009 3:55 PM

    Thanks for your response
    this issue is further briefed below
    we are working for a indian client with CIN. most of the PO's which is created in SAP system with all Excise parameters and applicable taxes. further all PO's created with GR based IV check box enabled.
    now the issue is, in some of the purchases vendor is not applicable for excise, so there is no excise parameters in the PO, only tax is applicable. for this case we have not maintained vendor excise details in J1ID. but we have maintained material chapter id and CENVAT determination in J1ID. but as i mentioed earlier these PO's also with GR based IV check box enabled.
    If the PO is not excisable no Excise capturing and posting is required, for these types of PO's we are following the below steps
    1. Creation of PO with GR based IV check box enabled
    2. Goods Receipt without excise capturing
    3. Invoice verification - MIRO ( here system is not able to post the docuement because of GR based IV tick mark)
    i hope this will brief about my query.
    waiting for your response.

  • Popup when clicking on a check box

    Hi All,
    I have created a report which has check boxes for each record. Now I need to do the following.
    1. When clicking on the check box cause a pop up box to appear
    2. This popup box will allow you to enter a date.
    3. The date is then populated into a field linked to that record
    I don't expect a answer but just some hints or links that would help.
    Thanks
    Nahim

    Thanks Pleiadian,
    I'll do that for the date field. I have another scenario as follows:
    1. You have multiple records with 4 check boxes on each record
    2. Each records represents a job.
    3. The check boxes allow you to accept ,reject,start or complete the job.
    4. When selecting "Reject" a pop up box needs to appear to allow the user to enter a rejection reason.
    Could you please give me some idea on how to get this done.
    Thanks for you help
    Nahim

Maybe you are looking for

  • I need to activate my I phone 5s gold it needs an I cloud id witch I don't have

    I need to activate my I phone 5s gold it needs an I cloud id witch I don't have

  • HD-DVD on Xbox 360

    Hi all, I'm still testing my HD-DVD that brun with DVDSP 4.12, it plays faultlessly on Toshiba HA2, but the menu button overlays are all became invisible on Xbox 360, but still working. Anyone have idea of what went wrong with the button overlay ? G

  • Same EDIDS-STATUS for the one IDOC NUM

    Hi Experts, I would like to ask if its possible that one IDOC no. could have make use of one IDOC Status no. and only the message will be changed. Let say: I have the following EDIDS structure: IDOC_NUM   IDOC_STATUS   IDOC_MESSAGES 000000238    50  

  • Poor system performance - Macbook Pro

    Hi Folks, I got my 15 inch macbook pro on Thanksgiving 2011. the configuration is as follows: Processor  2.2 GHz Intel Core i7 Memory  4 GB 1333 MHz DDR3 Graphics  Intel HD Graphics 3000 384 MB Software  OS X 10.8.2 (12C60) I usually dont shut down m

  • My Music app in Suffle Mode plays only 2 songs of any playlist and stops

    This problem starts after updating to iOS 5. In Continuos Mode all the songs of my differents playlist plays correctly. Only in Suffle Mode it plays 2 or 3 songs and freezes and the forward and backward buttons doesn´t works. I have to restart de app