How to capture values of multiple checkboxes.

Hello gurus,
        i am dynamically creating checkboxes in my page .Now i have to capture the values of all the checkboxes that are being checked and then delete the values from database table after submitting the button. I have used HTML tags .
Plz help.
Regards
Swati

Here you go...
<b>Layout:</b>
<% data: v_checkbox_id type string,
      sy_tabix type string.
Loop at itab into wa.
sy_tabix  = SY-TABIX.
concatenate v_checkbox_id 'CHK' sy_tabix into v_checkbox_id.%>
<td>
<input type="checkbox" id="<%= v_checkbox_id %>" name="<%= v_checkbox_id %>" maxlength="12" size="12"
checked = "<%= wa-field1 %>" />
</td>
<% ENDLOOP.
%>
<b>In Oninputprocessing:</b>
DATA: GT_TIHTTPNVP TYPE TIHTTPNVP.
data: v_checkbox_id type string,
         wa_formfields      TYPE ihttpnvp,
      sy_tabix type string.
REFRESH GT_TIHTTPNVP.
CALL METHOD REQUEST->GET_FORM_FIELDS
  CHANGING
    FIELDS = GT_TIHTTPNVP.
Loop at itab into wa.
sy_tabix  = SY-TABIX.
concatenate v_checkbox_id 'chk' sy_tabix into v_checkbox_id.
      READ TABLE GT_TIHTTPNVP INTO wa_formfields WITH KEY name = v_checkbox_id.
      wa-field1 = wa_formfields-value.
   append wa to itab.
endloop.
This will solve the problem..
<i>* Reward each useful answer</i>
Raja T

Similar Messages

  • How to get value from a checkbox in a jsp page?

    hi there
    i have a form in a jsp which contains a <input type='checkbox' name='xx'>
    when i submit the form, how can i get the value for this checkbox? i could use request object to get parameter. i tried the following and could not get any value:
    request.getParameter("xx");
    is there any to get it? thanks.

    "checkbox" can have multiple values b/c you can check more than 1 checkbox and they can have same name.
    Example
    <input type="checkbox" name="number" value="1">one
    <input type="checkbox" name="number" value="2">two
    <input type="checkbox" name="number" value="3">three
    To get values of "number" field:
    String [] numberValues = request.getParameterValues("number");
    where numberValues[0] is the 1st value checked, numberValues[1] is 2nd value checkted and so on.....
    If you have no checkbox checked then you might get a "null pointer exception", so make sure you check to see if it's null first before accessing your numberValues array.
    If you just have 1 checkbox; then you can just call request.getParameterValue("number") and that will return your value.

  • How to capture values dynamically from output screen

    Hi all,
    I have a new requirement.
    i developed a report which is showing output correctly. Here i have to take a check box for every record in output screen. if i check some of the check boxs then it should allow for further processing.
    i succeeded upto put checkboxes on output screen.
    but i don't know how to capture the values of checkboxes of every record into an internal table. it is necessary to capture into an internal table
    will it be work by using LOOP AT SCREEN statement.
    could you please explain with examples. it is normal report program only.
    i would appreciate an early reply
    Regards
    Prabhakar

    Sample code for usage:
    Internal table for Region and its Description
      data: begin of t_t005u occurs 0,
             LAND1 like t005u-land1,
             BLAND like t005u-bland,
             Bezei like t005u-bezei,
            end of t_t005u.
    Ranges for Country
      ranges: r_land1 for t005u-land1.
    Get the country codes and their descriptions
        refresh r_land1.
        clear r_land1.
      refresh t_dynpfields.
      move 'V_LAND1' to t_dynpfields-fieldname.
      append t_dynpfields.
      clear t_dynpfields.
    Read the value in the Country field on the screen
      call function 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = 'SAPLZ_VENDOR_MASTER'
          dynumb               = '0004'
          translate_to_upper   = 'X'
        TABLES
          dynpfields           = t_dynpfields
        EXCEPTIONS
          invalid_abapworkarea = 01
          invalid_dynprofield  = 02
          invalid_dynproname   = 03
          invalid_dynpronummer = 04
          invalid_request      = 05
          no_fielddescription  = 06
          undefind_error       = 07.
      read table t_dynpfields with key fieldname = 'V_LAND1'.
      if not t_dynpfields-FIELDVALUE is initial.
        r_land1-low = t_dynpfields-FIELDVALUE.
        r_land1-sign = 'I'.
        r_land1-option = 'EQ'.
        append r_land1.
        clear r_land1.
      endif.
    Get the Regions to be displayed as F4 Help
      select land1
             bland
             bezei
        from t005u
        into table t_t005u
       where spras = 'EN'
         and land1 in r_land1.
      if not t_t005u[] is initial..
    Popup to display Valid Regions for the selected country
        CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
          EXPORTING
            ENDPOS_COL   = 60
            ENDPOS_ROW   = 40
            STARTPOS_COL = 40
            STARTPOS_ROW = 20
            TITLETEXT    = 'Region'
          IMPORTING
            CHOISE       = v_choice
          TABLES
            VALUETAB     = t_t005u
          EXCEPTIONS
            BREAK_OFF    = 1
            OTHERS       = 2.
        if sy-subrc = 0.
          if v_activity = 'V'.
            read table t_t005u index v_choice.
            if sy-subrc = 0.
              v_regio = t_t005u-bland.
              move 'V_BEZEI' to t_dynpfields-fieldname.
              move t_t005u-bezei to t_dynpfields-fieldvalue.
              append t_dynpfields.
    Update the Region description on the screen.
              call function 'DYNP_VALUES_UPDATE'
                EXPORTING
                  dyname               = 'SAPLZ_VENDOR_MASTER'
                  dynumb               = '0004'
                TABLES
                  dynpfields           = t_dynpfields
                EXCEPTIONS
                  invalid_abapworkarea = 01
                  invalid_dynprofield  = 02
                  invalid_dynproname   = 03
                  invalid_dynpronummer = 04
                  invalid_request      = 05
                  no_fielddescription  = 06
                  undefind_error       = 07.
            endif.
          endif.
        endif.
      endif.

  • How to assign values from multiple output(cursor) to fields(line item-one below other) in forms??

    Hi all,
    I have a Form which has text_field columns as below , created from table RECEIVED_FORM_15G. This table is blank.
    1)     CUST_CODE with 1 line item. (Number of Items displayed=1)
    2)     ACCT_FD_NO with 10 line items. (Number of Items displayed=10)
    There are more than 1 ACCT_FD_NO for 1 CUST_CODE.
    When i enter the CUST_CODE and press tab, all the values of ACCT_FD_NO must get displayed. I am taking ACCT_FD_NO values from another table called KEC_FDACCT_MSTR
    and want to display ACCT_FD_NO, one below other (line item). So i put in the following code:
      BEGIN
           FIRST_RECORD;
           FOR CUR_R IN (SELECT  ACCT_FD_NO FROM KEC_FDACCT_MSTR WHERE   STAUS='E' AND ACCT_CUST_CODE=:CUST_CODE)
           LOOP
               NEXT_RECORD;
              :ACCT_FD_NO :=CUR_R.ACCT_FD_NO;
           END LOOP;
        END;
    But the problem is i'm not able to display the captured value in next consecutive line items.
    It is getting displayed in first & second line item only.
    The first value gets displayed in first line item, then the cursor moves from first line item to second line item,
    the second value gets displayed in the second line item, (this is because of NEXT_RECORD in my code)
    later all the values are getting displayed in the second line item only. (I checked it using message call.)
    I want it to display one below the other.
    The problem is the cursor is not moving to third line item after the second line item.
    So the remaining values gets displayed in the second line item only.
    So what is wrong in my code??
    Where should i place the next_record to make the cursor move from one line item to next line item i.e from second line item to third line item
    & third line item to fourth line item & so on....  Please let me know.
    Thank You.
    Oracle Forms Builder 6i
    Oracle 9i.

    The above code is right..
    The only mistake was In the property palette of CUST_CODE, "required" was not set to "Yes" .
    So after setting required to 'YES' , it worked perfectly fine.

  • Store value of multiple checkboxes in the database

    Hello,
    I have a table structure as table (masterid, types). Types has four values as AAA, BBB, CCC, DDD.
    I was wondering if there is any easiest and good way to implement this in Oracle forms. Currently, I have four checkboxes in the form. Each checkboxes has When-Checkbox-Changed trigger. In the trigger, I have put insert and delete statement depending on the value of the checkbox.
    Thanks for your help.
    Edited by: user12068331 on Jun 2, 2010 11:42 AM

    Hi Ammad,
    Thank you for your reply.
    I would really like the see the actuall table structure which you are having.
    I have created a sample script identical to my table structure.
    DROP TABLE "PEOPLE_INTERESTS" ;
    DROP TABLE PEOPLE;
    CREATE TABLE "PEOPLE"
    (     "PEOPLEID" NUMBER,
         "FNAME" VARCHAR2(40 BYTE) NOT NULL ENABLE,
         "LNAME" VARCHAR2(40 BYTE) NOT NULL ENABLE,
         CONSTRAINT "PEOPLE_PK" PRIMARY KEY ("PEOPLEID")
    insert into PEOPLE(PEOPLEID,FNAME,LNAME) VALUES(11111, 'ANDY', 'ADAMS');
    insert into PEOPLE(PEOPLEID,FNAME,LNAME) VALUES(22222, 'BRIAN', 'BANK');
    insert into PEOPLE(PEOPLEID,FNAME,LNAME) VALUES(33333, 'CAROL', 'CAMPS');
    DROP TABLE "INTERESTS_TYPE" ;
    CREATE TABLE "INTERESTS_TYPE"
    (          "INTERESTID" CHAR(3 BYTE),
    "INTERESTS" CHAR(30 BYTE),
              CONSTRAINT "INTERESTS_TYPE_PK" PRIMARY KEY ("INTERESTID")
    insert into INTERESTS_TYPE(INTERESTID,INTERESTS) VALUES('AAA', 'AGRICULTURE');
    insert into INTERESTS_TYPE(INTERESTID,INTERESTS) VALUES('BBB', 'BOOKS');
    insert into INTERESTS_TYPE(INTERESTID,INTERESTS) VALUES('CCC', 'COMPUTER');
    insert into INTERESTS_TYPE(INTERESTID,INTERESTS) VALUES('DDD', 'FINANCE');
    CREATE TABLE "PEOPLE_INTERESTS"
    (          "PEOPLEID" NUMBER,
    "INTERESTID" CHAR(3 BYTE)
         CONSTRAINT "PEOPLE_INTERESTS_CHECK" CHECK (Interestid IN ('AAA', 'BBB','CCC','DDD')) ENABLE,
         CONSTRAINT "FK_PEOPLE_INTERESTS" PRIMARY KEY ("PEOPLEID", "INTERESTID"),
    CONSTRAINT "FK_PEOPLE_INTERESTS_PEOPLE" FOREIGN KEY ("PEOPLEID")
         REFERENCES "PEOPLE" ("PEOPLEID") ,
    CONSTRAINT "FK_PEOPLE_INTERESTS_TYPE" FOREIGN KEY ("INTERESTID")
         REFERENCES "INTERESTS_TYPE" ("INTERESTID")
    insert into PEOPLE_INTERESTS(PEOPLEID,INTERESTID) VALUES(11111,'AAA');
    insert into PEOPLE_INTERESTS(PEOPLEID,INTERESTID) VALUES(11111,'CCC');
    insert into PEOPLE_INTERESTS(PEOPLEID,INTERESTID) VALUES(33333,'CCC');
    insert into PEOPLE_INTERESTS(PEOPLEID,INTERESTID) VALUES(33333,'BBB');
    insert into PEOPLE_INTERESTS(PEOPLEID,INTERESTID) VALUES(33333,'DDD');
    In the form, when user search for 'ANDY ADAMS', the out of four checkboxes,''AGRICULTURE'' and 'COMPUTER' checkboxes should be checked.
    I am working on what you wrote in the provious post and I get the idea of using cursor. Do I have to put his cursor in "WHNE_NEW_FORM_INSTANCE". I am sorry, you have to explain everything but I am new to this whole forms concept.
    Thanks,
    Girish

  • How to pass values for the checkbox

    Hi all,
    We all have seen the functionality of selecting a check box and then click the button and it performs the task(i.e in the hotmail when you select a line/lines by selecting the checkbox for that line and click the delete button those all mails are deleted). we are trying to implement this functionality. I have written the following code for that, but i get the values for the selected box if the box is the first one but if I did not select the first line and select the second line, i get the values for first line as well as for the secondline separated by comma . In other word it concatinates all values. Can I have some pointers?
    <INPUT TYPE="CHECKBOX" NAME="selectedBoxes" UNCHECKED value=<%out.println(" \"" + boxValues + "\" ");
    And also I don't know how to use the oncheck event for the check box...
    Thanks in advance...
    Ameeta

    Thanks Kan,
    But I am littlebit confuse about how does multiple values have been passed. For Example, i have selected 3 check boxes to delete the record. The value for each check box I need is name, event and hours...Each of these record is separated by '*'. I have three sets of values...for three records..
    1) Ameeta*overTime*5.00
    2) Ameeta*holiday*6.00
    3) Ameeta*weekends*8.00
    I have total 5 or 6 records for this person(Ameeta) and I want to delete these listed three...some how if I use the following coding it gives me all records before the last checked box...
    while(rs1.next())
    isEmpty = false;
    eventType = rs1.getString("EVENT_TYPE" ) ; ;
    eventDate = rs1.getString("EVENT_DATE" ) ;
    hours = rs1.getString("HOURS" ) ;
    hash += Double.parseDouble(hours) ;
    boxValues += eventDate + "*" + hours + "*" shortEvents "#";
    userId = rs1.getString("USER_ID" ) ;
    // employeeId = rs1.getString("EMP_ID" ) ;
    confirmFlg = rs1.getString("CONFIRM_FLAG");
    // out.println("\nrecordQuery:\n" + recordQuery ) ;
    %>
    <tr>
    <td colspan=5 width=100>
    <INPUT TYPE="CHECKBOX" NAME="selectedBoxes" value=<%out.println(" \"" + boxValues + "\" "); %>>
    <td width="150"><%=eventDate%></td>
    <td width="150"><%=eventType%></td>
    <td width="150"><%=hours%></td>
    <td width="150"><%=location%></td>
    <td width="150"><%=confirmFlg%></td>
    </tr>
    **************************************In this code basically I am concatinating so it is obvious that I get every thing before the check box..so I did the following change by adding the line below in the code
    while(rs1.next())
    boxValues = "";
    everything else is same....
    but now I get only the last one that is true too because I am asigning it to the null but I don't know how to pass all checked one.........can anybody help me?      
    Thanks in advance...
    Ameeta

  • How to capture indexes of multiple rows selected in Advance list

    Hi,
    - I have a prefilled advance list with multiselection enabled.
    - There is a button, associated with an action,which is bind to a eventHandler,that event Handler has script operation which conains the ruby scrpt code.
    - Now when i select multiple rows of that advance list and click on the action,I want to capture the indexes of all the selected rows.
    I tried using following ruby code:
    lead=$data.datalist.LeadSelectedIndex
    But it returns index of only first row selected out of various rows selected.
    So please anyone help me on that.
    Regards ,
    Saurabh Sharma.

    In FP2.6 there is no chance from SDK to have a mass enabled Action and bind to a mulli selection list as a BO Action in the UI Designer, as multiplicity will always be single and only lead selection would be selected.
    this feature comes only in FP3.0.
    So i am not sure what excatly Saurabh wants to do : maybe do some calculations based on multi seletions then i would do the following as also what Christian mentioned
    multiSelect =  ($data.DataList.GetSelectedRowsCount() > 1);
    NoOfRowsSelected = $data.DataList.GetSelectedRowsCount();
    SummationField = 0;
    if ( multiSelect )
       LeadSelection = $data.DataList.LeadSelectedIndex;
       RequiredDataField = $data.DataList.Get(LeadSelection).AnydataField;
       for i in 0..(NoOfRowsSelected - 1)
         currentRow = LeadSelection + i;
          RequiredDataField = $data.DataList.Get(currentRow).AnydataField;
    // imagine this is just add values of the RequiredDataField
         SummationField = SummationField +   RequiredDataField
       end
    end
    So i have not tried this directly - but i hope i make the idea clear.
    Regards,
    Nitesh Pai

  • How to submit values in multiple fragments?

    Hello,
    I am using Jdev 11.1.1.6 with ADFBC and ADF Faces as technology stack.
    Let me describe my use case first and then the problem.
    I have a BTF using page fragment. Let's call this MasterPage.jsff. This MasterPage.jsff has 2 regions, implemented as Master-Child BTF. Let's call them DeptTableM.jsff (Master) and EmpTableC.jsff (Child).
    Both fragments display data in read-only table with Edit button. When Edit button is pressed, another BTF included is rendered with Form layout. Let's call the form fragments as DeptFormM.jsff and EmpFormC.jsff.
    Both form jsffs have Save/Cancel button to complete the transaction and go back to display mode. Table and Form pages are using the same instance of VO.
    Hierarchy of fragments is:
    MasterPage.jsff
      ..DeptTableM.jsff   -->(region in MasterPage)
          ..DeptFormM.jsff     -->(region in DeptTableM)
      ..EmpTableM.jsff   -->(region in MasterPage)
          ..EmpFormM.jsff      --> (region in EmpTableM)The requirement is:
    1) When User press the Edit button in DeptTableM, DeptFormM should be rendered with fields available for modification
    2) While editing Dept fields, User should be able to press Edit button on EmpTableC and be able to modify the employee data
    3) When User press Save/Cancel in any fragment, it should affect (commit/rollback) in both the fragments. Make the form disappear and show updated data in table.
    Most of it is working fine with following issue:
    When User press Edit on say DeptTableM and modifies a value in a field (say DeptName) that does not have autoSubmit=true and then press Edit in EmpTableC. EmpFormC is rendered but the value of the field DeptName is reverted back to it's original value. It works fine for autoSubmit=true.
    Similarly, when both edit pages are visible and User make a change in DeptName field (autoSubmit=false) and press Save button in EmpFormC, it does not save the modified value in DeptName field. It works fine for autoSubmit=true fields and also when current page's Save button is pressed.
    Question:
    1) How to make the page to submit it's values when Edit button is pressed in another fragment.
    This usecase is globally required in our application and not one page requirement where you can just make every field autoSubmit. So I am looking for a solution without making every field to autoSubmit itself.
    2) If for some reason, autoSubmit is the only way then what could be the adverse impact of doing that in whole application with practically every field autoSubmitting (doesn't sound good though).
    Any help or pointer is highly appreciated.
    Thanks,
    Jai

    Thanks Sudipto and Frank for sharing this info. I have some questions:
    @Sudipto - The use case that I presented above is the simplest one. There are complex screens with 15-20 tabs at each level with 3-4 levels of master-child relationship. We are talking about almost 100-150 regions present on a page in different tabs. User has freedom to roam around, go to any tab and modify data using these Edit buttons and then finally Saving once. Since every BTF is using same transaction, every modified info is expected to be Saved with single save.
    How are you proposing queuing of ActionEvent to this hidden button (in every region) when we don't know which regions the User has modified the data?
    @Frank - I am not sure how this "command pattern" could help here. I understand that it helps in region-to-region interaction but how exactly it helps in submitting the values in region(s) other than current region.
    Are you suggesting to use contextual events to achieve what Sudipto suggested above i.e. using hidden button and queuing actionEvent on it?
    Sharing some more details: In our application, the Table jsff and Form jsff are based on 2 page templates. Table page templates has Add/Edit buttons and Form page template has Save/Rollback. Application is already using contextual events for region interaction and sharing info between regions using payload data. The architecture is not exactly "command pattern" but very similar to it. So I am familiar with contextual events and can implement something using it but I am not able to visualize on how to make use of it in this scenario.
    Another question from my original post is on setting autoSubmit property to true for every field. Is this good or bad idea? Does it put any adverse impact on performance?
    Thanks,
    Jai

  • In Select query how to fetch values through multiple parameters  where conditon

    Dear Experts,
    I have one table(T) with 4 fields: f1, f2, f3, f4. In that based on f2, f3, f4 and parameter condition( f2 values) how to fetch f1 values. I have attached screen shot. What is the where condition in select query?
    DATA: it_T type standard table of ty_T,
              wa_T type ty_T.
    parameters: p_f2_1 type T-f3,
                      p_f2_2 type T-f3,
                      p_f2_3 type T-f3,
                      p_f2_4 type T-f4,
                      p_f2_5 type T-f4,
                      p_f2_6 type T-f4.
    select f1  f2  f3  f4 from T into table it_T where ?
    What is the where condition ?.
    Regards,
    Abbas.

    Hi Syed,
    Do all the parameters p_f2_1 ... p_f2_6 contain values for the same field f2? And do you need all the entries from the table T which contain f2 = any of the entered value? If yes, Then you can try the following where condition -
    select f1  f2  f3  f4 from T into table it_T
      where f2 =  p_f2_1  OR
                 f2 =  p_f2_2  OR
                 f2 =  p_f2_3  OR
                 f2 =  p_f2_4  OR
                 f2 =  p_f2_5  OR
                 f2 =  p_f2_6.
    P.S: If any of the above parameters are optional as per your requirement it will be better to build a dynamic query and use it in the where condition.
    Regards,
    Rachna.

  • How to Captured Value into Select-Options Range Table Without "Enter"

    Hi,
    I defined a set of Select-Options in the Web Dynpro. I found that the value for the Select-Options will not be captured whenever I manually type in the value instead of choosing it from F4 Help Drop Down.
    However, this problem can be resolved if I manually type in the value for Select-Options in the Selection Field and I press "Enter". Without pressing "Enter" value will not be captured.
    Any solution for this issue? Please help.

    Hi Kris,
    My problem is only when the user key in the value themselves rather than choosing it from Select-Options drop down value. Most of the time user will know what value to key in and will skip the step to choose from the Drop Down List. Thus, if this happen, the value keyed in by the user will not be able to capture into the range table.
    I am using this logic to capture the value for selection item:
      wd_this->m_helper->get_selection_screen_items(
        IMPORTING et_selection_screen_items = lt_sel_item ).
    * Values From Selection Screen
      LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
        CASE <fs_sel_item>-m_id.
          WHEN `PERNR`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_pernr>.
          WHEN `BUKRS`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_bukrs>.
          WHEN `STAT2`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_stat2>.
          WHEN `WERKS`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_werks>.
          WHEN `BTRTL`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_btrtl>.
          WHEN `PERSG`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_persg>.
          WHEN `PERSK`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_persk>.
          WHEN `ABKRS`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_abkrs>.
          WHEN `BEGDA`.
            ASSIGN <fs_sel_item>-m_value->* TO <fs_begda>.
        ENDCASE.
      ENDLOOP.
    E.g. User key in the BUKRS without using the Drop Down Value provided by the Select-Options. For this case, <fs_bukrs> table will be initial as no value is captured.
    Edited by: Girish Nabar on Apr 21, 2011 8:55 AM

  • How to sum values from multiple lines in a DataTable?

    I have a Lookout program which uses a DataTable to allow users to write basic programs (relay on/off times, which relays change state, and pause times).  The DataTable cursor position changes to advance from one program stage to another.  
    What I would like to do is sum up the times from all the various stages.  Can anyone suggest how I might iterate through the DataTable using Lookout alone?  
    Thanks,
    Dave 

    I have tried to make 'loops' similar to that one but Lookout shows a message that iterations or loops for a variable are not allowed.
    You can use a sequencer but there are 2 inconvenients:
    1.- For a fast computer every step of the sequencer cannot be faster than 0.1 - 0.2 seconds. If you have many iteraciones, it will take some time.
    2.- The sequencer object has a maximimum of 100 steps.
    Ryan S. Here are questions for you:
    1.- Is there a way to add in the lks file statements and or functions using existing variables? What can be done and what not?
    2.- Is there a way to insert comments in the lks file?
    Thanks in advance.
    Rudy Lopez

  • How to Capture Value from Form in DFF at Data Entry Level

    I need to catch some Atrribute into DFF, which are stored in Customer Master DFF to Order Entry Form DFF, when that Particular Customer is selected.
    For e.g. If in DFF of Customer Master Attribute1 is 'XYZ' for ABC Customer.
    When user is booking Order For that Customer, Order Heaer DFF should be polulated by 'XYZ'.

    Use NAME_IN function to get value.

  • Passing Multiple Checkbox Values Help

    Brand new to Coldfusion and I'm struggling to figure out how to pass values from multiple checkboxes on a form to a confirmation page and then an action page that inserts the data. The confirmation page will simply show their selections and allow them to go back and reselect, or submit to the action page.
    Form > Confirmation Page > Action
    I've found a couple of examples on the Web that mention looping, and one that said to use a WHERE IN clause but I'm lost on how to pass it through and insert at the end. Maybe the confirmation and action can be on the same page?
    Questions:
    1. Is it better to name all of the checkbox values the same or append some type of extra character and then evaluate at the end?
    2. Do I need to have hidden fields on the confirm page to transfer the data inbetween the form and action page?
    3. Can the confirmation and action be on the same page or should they be separated?
    4. What should the Query/Insert statement look like on the action page?
    I'm looking to see a basic example of code from start to finish, any help is greatly appreciated as I'm in learning mode.
    Thanks

    kittlez wrote:
    Ok so I know how to pass everything to the second page. I'm guessing I need hidden fields on that second page to go through to the last page where I insert the records...correct?
      That is one way to do it.  But one might also want to look into session variables if they have not been considered.
    When I've tried to do this I end up with something like this item1,item2,item3 all together which the database will not accept. How do I write the multiple values to the database so they are considered to be separate records.
    item1,item2,item3 is what you are supposed to get according to the HTTP protocol standard.  To insert that into a database you just need to recognize that you are getting a list and use ColdFusions list handling functions and tags to help you iterate through the list and do what you need to do with the data.
    This is a very hand code snippet for this type of work:
    <cfloop list="#listVariable#" index="aVar">
      #aVar# will equal one list item.
    </cfloop>

  • Dynamic Page with Multiple Checkboxes

    I am trying to get a dynamic page to pass the checked value of multiple checkboxes to the submit proceedure. Can anyone tell me what I am doing wrong?
    Thanks in advance,
    Pam -------------------------------------------------------------------------
    Dynamic Page:
    <HTML>
    <FORM action="scott.brsubmit" method="POST">
    <TABLE border CELLPADDING=0 CELLSPACING=0>
    <ORACLE>begin
    for c1 in (SELECT rowid,ename, job, bonus from scott.bonus_approval where approved is null)
    loop
    htp.p('<tr><td><FONT FACE= ARIAL SIZE=1>');
    htp.p(c1.ename);
    htp.p('</TD><td><FONT FACE= ARIAL SIZE=1>');
    htp.p(c1.job);
    htp.p('</TD><td><FONT FACE= ARIAL SIZE=1>');
    htp.p(c1.bonus);
    htp.p('</TD><td><FONT FACE= ARIAL SIZE=1><B>');
    htp.p('<input type="hidden" name="p_ename" value='||c1.ename||'>');
    htp.p('<input type="checkbox" name="p_cb" value="Y">');
    htp.p('</TD><td><FONT FACE= ARIAL SIZE=1><B>');
    htp.p('<input type="checkbox" name="p_cb2" value="N">');
    htp.p('</td></tr>');
    htp.p('<br>');
    htp.p('
    end loop;
    HTP.P('</table>');
    htp.p('<p>');
    htp.p('<input type=submit value="Save" name="p_action" >');
    end;
    </ORACLE>
    </form>
    </BODY>
    </HTML>
    Procedure:
    (p_ename in portal.wwv_utl_api_types.vc_arr, p_cb in portal.wwv_utl_api_types.vc_arr, p_cb2 in portal.wwv_utl_api_types.vc_arr, p_action varchar2)
    as
    begin
    if p_action = 'Save' then
    for i in 1..p_ename.count loop
    if (p_cb(i) = 'Y') then
    update scott.bonus_approval set approved = p_cb(i) where ename = p_ename(i);
    COMMIT;
    else
    if (p_cb2(i) = 'N') then
    update scott.bonus_approval set approved = p_cb2(i) where ename = p_ename(i);
    COMMIT;
    END IF;
    end if;
    end loop;
    end if;
    htp.print('<script language="JavaScript">');
    htp.print('function display() {
    var msg = "\nRecord Saved Successfully\n";
    alert(msg)');          
    htp.print('}');
    htp.print('display()');
    htp.print('</script>');
    exception
    when others then
    htp.print('<script language="JavaScript">');
    htp.print('function display2() {
    var msg = "\nRecord Not Saved.\n";
    alert(msg)');          
    htp.print('}');
    htp.print('display2()');
    htp.p('Not saved');
    htp.print('</script>');
    end;

    Hi.
    I have a dynamic page, with a bind variable :v_day. On the customization screen the user can select one or more days of the week, or all days. I use this also in a report and then it works ok. In the where clause i use:
    and rtrim((to_char(date_time,'DAY'))) IN :v_day
    Date_time is a tablecolumn (date).
    When i add this line in the select script from the dynamic page, i get error:
    : ORA-06550: line 1, column 2443:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    The symbol "(" was substituted for "" to continue.
    ORA-06550: line 1, column 2606:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    . ( ) , * @ % & - + / at mod rem <an exponent (**)> and or ||
    The symbol ")" was substituted for ";" to continue.
    ORA-06550: line 1, column 3236:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    The symbol (WWV-11230)
    Critical Error in wwerr_api_error.get_errors! SQL Error Message: ORA-06502: PL/SQL: numeric or value error: character string buffer too small (WWV-)
    Thanks.

  • How do I use the form checkbox value?

    I'm creating a form that has multiple checkboxes. I want to
    use ActionScript to update a text box/area with the values each
    checkbox as the checkbox is selected. Any ideas on how I might do
    that?
    SAMPLE CODE ATTACHED.

    I figured out how to do it using both the last poster's
    comments, and some others that I found.
    A form is created using cfform format=flash.
    A cfinput text box is created and flagged as not visible.
    The "invisible" input value is set after a cfoutput
    query="xxxx"
    is completed.
    Since I'm using the query to do double duty, I have a group
    set.
    My "second" group is the one on which I wanted the check
    boxes to
    be created dynamically.
    I set a counter, and kept track of when a check box was
    created.
    The value of the counter was eventually set as the value of
    my
    first "invisible" text box.
    Here's the code:
    <cfformgroup type="horizontal" height="1" visible="no">
    <cfif #BoxCount# GT 0>
    <cfoutput><cfinput name="BoxQty" type="text"
    value="#BoxCount#" visible="no" size="3"></cfoutput>
    </cfif>
    </cfformgroup>
    Each check box was given a unique name, text + counter.
    ex. camp#BoxCount#
    A corresponding "invisible" text box was created:
    ex. cost#BoxCount#
    This way I can test if the check box "value" is true/false,
    and
    set a cost accumulator to the proper cost.
    My cfsavecontent code looks like this:
    // COST TOTAL
    var a = Number(BoxQty.text);
    var i = 0;
    var j = 0;
    var u = 0;
    var x = 0;
    var s = "";
    for( i=1; i<=a; i++ )
    r = "camp"+i;
    if( eval(r).value ) // just like the JS eval()
    // box was checked, i.e. is "true"
    s = "cost"+i;
    j = Number(eval(s).text);
    if( j > 0 ) x = x + j; // add to the total accumulator
    //campCost is the cfinput text box used to display the total
    cost.
    campCost.text = 0;
    if( x != 0 )
    campCost.text = "$" + x + ".00";

Maybe you are looking for

  • Prime 1.3 Numerous Issues

    We are having some issues with Prime 1.3.  We need some advice and tuning, a backup and rebuild/restore has not addressed these issues. Specifically - System resource usage. The server uses 100% of all four 2.6/3ghz turbo CPUs every 15 mins and runs 

  • What's the work can we do for the position SAP-Workflow developer live link

    Hi, I got the requirement as a workflow developer. The requirement is to work as a SAP-Workflow live link open text developer. What does the  live link open text means? Early reply is highely appriciable. Regards, Chow.

  • Playback on HD DVD players or something average Joe(with a HDTV) can watch

    With these new Quicktime Codecs are there any solutions/players that playback HD movies other than off a harddrive on a computer with the "ability/Quicktime" to play them back. I make moving fine art films and I need to have a strategy so I can get m

  • What order or in what way are the resource authorization policies applied?

    I understand what RAP/CAP are and how they work and I know that the CAP are applied according to the order. The RAPs are not linked to a specific CAP. My question is how are the RAPs applied. You can obviously have a group or a nested group in one or

  • Common Error Mesg Frustrating

    hi,new to java,soplease be patient: 1) I've installed jdk1.6 on c drive in a folder named java 2) I've also saved the "HelloWorldApp.java" text file in the same folder 3) Now I try to run with C:\java\jdk1.6.0_10\bin\javac HelloWorldApp.java at the c