Multirow Update with checkboxes

Hi all,
I have created a page with checkboxes referencing the database columns.
The End User can only update the rows.
The database values will be correct shown, but when I will update the values I get error message: "No data found".
There is the Region code:
=======================
declare
v_query varchar2(32767);
v_where varchar2(4000);
begin
v_query := 'select td.id, apex_item.hidden(3,tm.id) master_id, tm.col1, tm.col2, apex_item.checkbox(1, td.flag1, decode(td.flag1, ''YES'',''CHECKED'', null)) flag1, apex_item.checkbox(2, td.flag2, decode(td.flag2, ''YES'', ''CHECKED'', null)) flag2 from test_master tm, test_detail td ';
if :P1_PARAMETER is not null then
v_where := ' where td.master_id = tm.id and td.id like :P1_PARAMETER';
else
v_where := ' where td.master_id = tm.id';
end if;
v_query := v_query || v_where;
return v_query;
end;
=======================
The code of update process:
=======================
for i in 1..apex_application.g_f01.count loop
update test_detail
set flag1 = apex_application.g_f01(i),
flag2 = apex_application.g_f02(i)
where id = apex_application.g_f03(i);
end loop;
=======================
I have tested it with text fields. And get no errors...
Is the multirow update with checkboxes supported?
There is the application:
http://apex.oracle.com/pls/otn/f?p=23584:1:970725829920206:::::
Regards,

Hi,
what do you mean under save "primary key"?
the following does not solve the problem too:
Process code:
=======================
declare
v_id1 number;
v_id2 number;
v_flag1 varchar2(3);
v_flag2 varchar2(3);
begin
for i in 1..apex_application.g_f03.count loop
v_flag1 := substr(apex_application.g_f01(i),1,instr(apex_application.g_f01(i),'~',1,1)-1);
v_id1 := substr(apex_application.g_f01(i),instr(apex_application.g_f01(i),'~',1,1)+1);
v_flag2 := substr(apex_application.g_f02(i),1,instr(apex_application.g_f02(i),'~',1,1)-1);
v_id2 := substr(apex_application.g_f02(i),instr(apex_application.g_f02(i),'~',1,1)+1);
update test_detail
set flag1 = apex_application.g_f01(v_flag1),
flag2 = apex_application.g_f02(v_flag2)
where id = apex_application.g_f03(i);
end loop;
end;
========================
for query like
v_query := 'select td.id, apex_item.hidden(3,tm.id) master_id, tm.col1, tm.col2, apex_item.checkbox(1, td.flag1||''~''||tm.id, decode(td.flag1, ''YES'',''CHECKED'', null)) flag1, apex_item.checkbox(2, td.flag2||''~''||tm.id, decode(td.flag2, ''YES'', ''CHECKED'', null)) flag2 from test_master tm, test_detail td ';

Similar Messages

  • MultiRow Update using CheckBox

    I have a multi-row table and the user is supposed to check/un-check a check box to indicate which row needs to be updated. After the user clicks on the save button, I want to process each row and set a field in the row to a certain value based on the checkbox value (true or false)
    Using Jdeveloper 10.1.3.2.

    Hi,
    have a look at example 117 at http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html
    If you want to use this information to update a field then this can be done without the detour of using a temporary unbound checkbox
    Frank

  • Problem with checkbox and process

    Hallo,
    I have a checkbox on my page and now I want to create a process that runs when the checkbox is checked.
    What I want to do is: to ckeck wheather the checkbox is check and if this is then to set values.
    I don't know if it is right how I check the status of the checkbox. What I also don't really know how I can decide
    that all field I go through in the loop get the same value from the XYZ-collection. The value should be the last from
    the XYZ-collection.
    Thanks, Jade
    declare
    check integer:=0;
    change integer:=0;
    begin
    check:=:Px_Check;
    if (check <> 0) then change:=1; end if;
    if change = 1 then
    for i in 1..htmldb_application.g_f04.count
    loop
    htmldb_collection.update_member_attribute(p_collection_name=>'XYZ',
    p_seq=>i,
    p_attr_number=>5,
    p_attr_value=>???);
    end loop;
    end if;
    end;

    Hi,
    Taking the two issues separately....
    1 - When dealing with checkboxes, you have to bear in mind that the submit process will only return the values of those checkboxes that have been ticked into the f04 collection (assuming f04 is the column containing your checkboxes). In order to determine which ones they are, you need to get the value (which should be a row number if you've created the checkboxes by using the Row Selector option) and then use that to get to the values on the actual rows. Something like:
    DECLARE
    vITEM NUMBER;
    BEGIN
    FOR i IN 1..HTMLDB_APPLICATION.G_F04.COUNT
    LOOP
      vITEM := HTMLDB_APPLICATION.G_F04(i);
    END LOOP;
    END;Then, within the loop, you can use vITEM as the row number. So, if the user ticked items 1, 4 and 6. G_F04(1) would contain 1, G_F04(2) would contain 4 and G_F04(3) would contain 6. Therefore, for you update statement, you can use vITEM for the sequence number of the item to update.
    2 - When dealing with collections, if you want to get to the last item in the collection, you can get the member count and use that to get to the member:
    DECLARE
    vCOUNT NUMBER;
    vDATA NUMBER;
    BEGIN
    vCOUNT := HTMLDB_COLLECTION.COLLECTION_MEMBER_COUNT ('XYZ');
    SELECT c005 INTO vDATA FROM HTMLDB_COLLECTIONS WHERE COLLECTION_NAME = 'XYZ';
    END;That should get the c005 value for the last item and store it in vDATA. You can then update the ticked items with this value.
    Andy

  • ADF Table with CheckBox - Select/deselect issue

    I have seen couple of threads and blogs for ADF table with check box . but none of them exactly matching with my requirement . My Database table does not have any field for check box .
    Here is my DB Table
    tableA_
    A_Id
    A_Name
    tableB*
    B_Id
    Requirements :*
    1. Display the above tables data with Checkbox . ( if A_Id = B_Id then the checkbox will be checked , else unchecked ) .
    2. Select / deselect the check box and save the data . Saving the data , will update only tableB . i,e when a new check box is selected then A_Id value will be inserted to tableB . Similarly , deselecting a checked in data will remove the entry from tableB.
    Development :
    1. Created a VO where tableB has marked as updateable .
    2. Created a transient Boolean variable for checkBox . and modified the getter method of checkbox for returning true/false based on the below condition in the ViewRowImpl Class .
    if ( A_Id = B_Id )
    return true;
    else false ;
    3. I have not modified the setter method .
    Using the above concept i can view the data with selected checkbox . but the problem is to save the data . because , when I select a checkbox the above coding in the getter method will return false .
    Therefore , though i am selecting the checkbox but value of the checkbox has been set as false .
    While saving the Data , I am iterating through the VOIterator and observed that a newly selected checkbox value is false . and realized its because of the getter method condition .
    Can you please suggest how can I overcome this issue or shall I need to take any other approach ?
    Jdev version 11.1.1.5
    Regards,
    Amitava
    Edited by: Amitava on Mar 17, 2012 3:48 PM

    You need to go through the ADF page life cycle concepts. In simple words the boolean value in the model is not set while in valueChangeListener. Try adding valueChangeEvent.getComponent().processUpdates(FacesContext.getCurrentInstance()); on top in your listener method and see the effect.
    Reference:
    http://docs.oracle.com/cd/E15051_01/web.1111/b31974/adf_lifecycle.htm

  • Accessing Node Labels - TreeControl with CheckBoxes

    Hello,
    I have a Tree component that is loaded with CheckBoxes.  Each node has a label associated with it, and I need to be able to collect the labels and display them on the right of the component - probably using a Label or Text control.
    I can't seem to figure out how to access the names of the items that are checked.  I'm including a complete, and simplified, mxml file.  If anyone would like to take a look at it, I would appreciate it.
    Thanks.
    OH - And I am using the Tree CheckBox component from this site:  http://www.sephiroth.it/file_detail.php?id=151
    Sorry, but the forum will not allow me to upload the files directly.
    You will probably need to add those classes to see the Tree CheckBox.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:controls1="it.sephiroth.controls.*">
        <mx:Script>
            <![CDATA[
                import mx.events.DataGridEvent;
                import mx.controls.dataGridClasses.DataGridColumn;
                import mx.effects.easing.Bounce;
                import mx.effects.easing.Elastic;
                import components.MyPanel;
                import mx.effects.easing.Bounce;
                import mx.effects.easing.Elastic;
                import mx.events.MenuEvent;
                import mx.controls.Alert;
                import mx.controls.Menu;
                import mx.events.CloseEvent;
                import mx.controls.*;
                import mx.events.ListEvent;
                import mx.events.TreeEvent;
                import it.sephiroth.renderers.TreecheckboxItemRenderer;
                //*******************************  TREE CONTROL CHECKBOX ******************************************
                 * Called on checkbox click
                 * check and update for both parents and child nodes
                 * according to the checkbox status
                private function onItemCheck( event: TreeEvent ): void
                    updateParents( event.item as XML, ( event.itemRenderer as TreecheckboxItemRenderer ).checkBox.checkState );
                    updateChilds( event.item as XML, ( event.itemRenderer as TreecheckboxItemRenderer ).checkBox.checkState );
                 * @see it.sephiroth.controls.CheckBoxExtended#checkState
                private function updateChilds( item:XML, value: uint ):void
                    var middle: Boolean = ( value & 2 << 1 ) == ( 2 << 1 );
                    var selected: Boolean = ( value & 1 << 1 ) == ( 1 << 1 );
                    if( item.children( ).length( ) > 0 && !middle )
                        for each(var x: XML in item.node )
                            x.@checked = value == ( 1 << 1 | 2 << 1 ) ? "2" : value == ( 1 << 1 ) ? "1" : "0";
                            updateChilds( x, value );
                private function updateParents( item: XML, value: uint ): void
                    var checkValue: String = ( value == ( 1 << 1 | 2 << 1 ) ? "2" : value == ( 1 << 1 ) ? "1" : "0" );
                    var parentNode: XML = item.parent( );
                    if( parentNode )
                        for each(var x: XML in parentNode.node )
                            if( x.@checked != checkValue )
                                checkValue = "2"
                        parentNode.@checked = checkValue;
                        updateParents( parentNode, value );
            ]]>
        </mx:Script>
        <!--*********************  CHOOSE FUNCTIONAL AREAS/CAPABILITIES FOR SCENARIO TREE DATA ******************-->
        <!--
            Example of the xml used as dataprovider
            for the treecheckbox component.
            @label used for the item label
            @checked used for the checked status:
                0 = un-checked
                1 = selected
                2 = 3rd status selected
                otherwise you can use the set the "checkField" attributes of the
                treecheckbox component to specify which xml attribute to use for the
                checked status
        -->
            <mx:XML xmlns="" id="treeSource">
                <node label="home" checked="">
                    <node label="First Responder" checked="">
                        <node label="1RSP First Responder - Medical" checked=""/>
                    </node>
                    <node label="Battalion Aid Station/Sick Call" checked="">
                        <node label="Battalion Aid Station" checked=""/>
                        <node label="BAS - NBC" checked=""/>
                        <node label="Evac" checked=""/>
                    </node>
                    <node label="Forward Resuscitative Surgery (FRSS)" checked="">
                        <node label="Pre-Op" checked=""/>
                        <node label="Operating Room" checked=""/>
                        <node label="Post-Op" checked=""/>
                        <node label="Evac" checked=""/>
                    </node>
                    <node label="Surgical Company" checked="">
                        <node label="Triage/SST" checked=""/>
                        <node label="Triage Evac" checked=""/>
                        <node label="Operating Room" checked=""/>
                        <node label="OR Evac" checked=""/>
                        <node label="OR Evac" checked=""/>
                        <node label="Ward" checked=""/>
                        <node label="X-Ray" checked=""/>
                        <node label="Laboratory" checked=""/>
                        <node label="Pharmacy" checked=""/>
                        <node label="NBC Unit" checked=""/>
                        <node label="Dental" checked=""/>
                        <node label="PMO/EHO/PMT" checked=""/>
                        <node label="PM Entomology" checked=""/>
                        <node label="Occupational and Environmental Healty Sur" checked=""/>
                    </node>
                </node>
            </mx:XML>
            <controls1:TreeCheckBox id="mytree"
                showRoot="false"
                width="345"
                height="100%"
                dataProvider="{treeSource}"
                openItems="{treeSource..node}"
                labelField="@label"
                checkField="@checked"
                itemCheck="onItemCheck( event )"
            />
            <mx:Label x="455" y="48" text="Label" fontSize="16" color="#FFFFFF" id="tree_label1"/>
    </mx:Application>

    Natasha,
    Thanks for your reply.
    I attempted the code:
    public function get labelText():String 
     if (this.label != null) 
    return this.label.text 
    else
     return ""; 
    return "";
    But when I try to access the code in the application I get the error "Call to possibley undefined method labelText."
    I'm not sure I understand exactly how to implement this change within the application itself.  Could you explain?  Thanks.

  • How to create a JTable with CheckBox(checkbox should be added to a buttong)

    hi,
    i want a JTable with checkbox or radio button with them as editable.Only one check box can be selected i.e i want to add it to button group.no of rows in the table to not fixed
    And on the click of radiobutton a text field has to be updated.
    how to do this???
    thanks
    neel

    I think this article would be helpful:
    http://www.chka.de/swing/table/columns.html
    But don't expect any thanks from the OP!Exuse me my dummy question. But I am novice at this
    forum. Who is OP and what do you mean?OP - Original Poster.
    Thanks - a response indicating that your efforts in providing a solution to a problem are appreciated!

  • Multiple Usage unchecked but shadow table still updated with IUUC_PROCESSED = 0

    Hello,
    We changed several MT_IDs by unchecking the Multiple Usage checkbox:
    The OLI functions have been redesigned correctly and all Run Time Objects also. The IUUC_PROCESSED field is now conditioned to empty in the Abap statements:
    *** get records from logging table
    SELECT * FROM /1CADMC/00001360 CLIENT SPECIFIED
      INTO TABLE _IT_IO_S_/1CADMC/00001360 UP TO I_NUM_OF_RECORDS ROWS
      WHERE (_WC_S_/1CADMC/00001360)
       AND IUUC_PROCESSED = ' '
      ORDER BY
        IUUC_PROCESSED
    TABNAME
    VARKEY
    IUUC_SEQUENCE
    %_HINTS MSSQLNT 'TABLE &TABLE& abindex(IUC), READCOMMITTED,READPAST'.
    However the records in the table are still updated with IUUC_PROCESSED equals to 0:
    We use DB6 09.07.0005 and ECC 6.0 with DMIS 2011_1_731 0004 SAPK-11604INDMIS DMIS 2011_1.
    Any idea?
    Regards,
    Laurent

    I have the "techie" answer for all of you. According to the tier 2 support at Norton Help Desk, the latest live update from Norton "utilizes Visual Studio 2012 which enables SSE2 instructions" and my processor can not handle that.
    He said they are "working on a solution" and offered to reply back on Wednesday / Thursday this week if a solution could be found...

  • Updateable  report  with CHECKBOX - Error in MRU: row= 1, ORA-01403:

    Hi All,
    Lets say I have a table tab_1 with column return_flg
    I have an updateable report - tabular form.
    For the return_flg column I have:
    I have Tabular Form Element attribs:
    Display As Standard Report Column
    Default Type No Default
    Default
    Reference Table Owner - no reference selected
    Reference Table Name TAB_1
    Reference Column Name RETURN_FLG
    But there is no CHECKBOX display type..so I used HTMLDB_ITEM.CHECKBOX in the SQL...
    Select ID, .....
    HTMLDB_ITEM.CHECKBOX(1,RETURN_FLG) "RETURNED"
    from tab_1 where order_id = '1'
    How do I get it to update with the MRU?
    I get Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-01403: no data found, update TEMP_USER.TAB_1 set "ID" = :b1
    Thanks for the help, BillC
    Message was edited by:
    bcarlis_2000

    No, I had an updateable report that works great..
    Lets say
    Select ID, item_name
    from TAB_1 where ID = '1'
    Updates great!
    then added column to the table to track if item was returned.
    RETURNED_FLG
    changed select of same form to:
    Select ID, item_name
    from TAB_1 where ID = '1'
    HTMLDB_ITEM.CHECKBOX(1,RETURNED_FLG) "RETURNED"
    Now, it updates great IF the checkbox is not checked but gives the error if checked.

  • Cant open itunes. get error message 7 followed by error message windows error 127.     i have redownloaded new updates with luck.   window xp

    cant open itunes. get error message 7 followed by error message windows error 127.     i have redownloaded new updates with luck.   window xp

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it, which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    tt2

  • I connected my external hard drive to my new imac to put all of the information from my macbook onto it. i have been working on the macbook now and want to reconnect the external hard drive so my imac is updated with the work. How is that done?

    I connected my external hard drive to my new imac to put all of the information from my macbook onto it. I have been working on the macbook now and want to reconnect the external hard drive so my imac is updated with the work. How is that done? or is it possible?

    As I said, I don't use Time Machine, so it'd be best to wait for an "expert" answer, but, with my very limited knowledge, I'd say: probably not - so, for now, I'd suggest you read up on Time Machine:
    http://web.me.com/pondini/Time_Machine/Home.html
    http://support.apple.com/kb/index?page=search&src=support_site.home.search&local e=en_US&q=time%20machine
    And, you might be attracting more knowledgeable answers if you were to post this question in the Time Machine Forum (part of the Snow Leopard forums).

  • Batch Characteristic not updating with result for linked MIC

    Hi,
    I have created a MIC and linked to a batch characteristic i.e. potency and included the characteristic in a specific batch class. This MIC is part of the inspection plan for a certain material.
    If I generate a lot of origin 01 and 09 for the material and record a result for the MIC and apply a UD, the batch characteristic is not updated with the result recorded in the batch master record..
    If I generate a lot origin 89 for the same material, when the result is recorded for the MIC and apply a UD the batch characteristic is updated with the mic value in the batch master record.
    Can you help regards?

    Ok. I am a little bit further.
    I put a trace (ST05) on the result recording and I find a difference between 4.7 and ECC6.0.
    In ECC6.0 I've an deletion in table "AUSP". This deletion isn't performed in the 4.7 system.
    Hope that this can help to solve my problem.
    Regards,
    René
    @ Mayank
    Above, all the master data and customizing is mentioned to transfer the result to the batch classification
    Edited by: Rene Fuhner on Jul 30, 2010 7:03 PM

  • How do you transfer voice memos to your pc?  I have synced my phone a number of times and everything updates with the exception of voice memos?

    How do you transfer voice memos to your pc?  I have synced my phone a number of times and everything updates with the exception of voice memos? Also, my voice memos are checked to be synced everytime my phone is synced. 

    Voice memos, once correctly synced, will appear under your Music Library.  Can you go through your music library to check?

  • Problems with software the update with Nokia 6233

    Problems with software the update with Nokia 6233
    Hello,
    I have so far some-paints tries my software to update.
    Each time the update procedure begins, sometime stands then on the telephone “test mode”.
    On the computer wars I the reference in the update manager “connection to the telephone broken off” and wants the update to again start.
    If I change my profile attitudes since that for example, then after a telephone restart again deleted.
    What there can I make?
    GreetingsMessage Edited by adisaily on 24-Aug-2007 09:03 AM

    It sounds like your 5800 has the earpiece fault that was common with 5800's made before February.
    You need to take it to a nokia care point for repair under warranty.
    Care points/service centres and repair info:
    UK • Europe • Asia-Pacific • USA •
    Canada • Middle East and Africa
    Elsewhere: Click here, select your country, go to the support section, then select repair.

  • I have a column where I have implemented writeback, its working fine. On top of this I need to show 0 as No and 1 as yes in our report, that is also done. Now I want to enter Yes in a column where it was no and I want database table to get update with 1.

    I have a column where I have implemented writeback, its working fine. On top of this I need to show 0 as No and 1 as yes in our report, that is also done. Now I want to enter Yes in a column where it was no and I want database table to get update with 1. I am not sure how to do it. SOmeone please help me out.

    Hi ,
    In your write back XML  try the below  query insert
    INSERT INTO TABLE_XYZ (attribute1)  values (SELECT CASE  WHEN @{C1}=’Yes’ then 1 when @{C1}=’No’ then 0 else null end from dual)
    Regards
    Rajagopal

  • How to get my custom controller updated with the global custom controller?

    Hi all,
    I'm new to CRM Web UI and need some advice from the expert. Currently I'm working on component ICCMP_BT_DATES and noticed something weird with this component. When this component is first launch it display the dates of a service ticket correctly. However when I navigate to another screen, save a new ticket and back, the dates are not reflected. When I went in and debug the component, I noticed that the context is still tied to the previous ticket. I think the custom controller is not updated with the latest from the global custom controller.
    My question is how do I get my custom controller updated with the latest.
    Regards,
    Ricky

    You have to bind your custom controllers context node to the event NEW_FOCUS of the collection wrapper on the global custom controller.
    Best place to do this might be the CONNECT_NODES of the context of your custom controller.
    Get the global CuCo with GET_CUSTOM_CONTROLLER() and then the appropriate context node. Now:
    SET HANDLER yourMethod for lr_global_cuco->typed_context->thecontextnode->collection_wrapper activation iv_activate.
    Of course you have to implement a method similar to ON_NEW_FOCUS as it is on many other nodes.
    cheers Carsten

Maybe you are looking for

  • The call was cancelled by the caller before the remote party answered

    Hi, We have a Lync 2010 Enterprise deployment in a single site with 2 FE and Mediation Server collocated. When dialling a number from a PSTN phone the call gets routed via our PBX/PBX Gateway/Mediation Server/FE Server to the desktop Lync client succ

  • Work-Flow in ABAP

    hi GURU's... I am new to SAP ABAP fresher. I am interested in work-flow in abap. Material in internet is so confusing. Can any one please help me out thanks in advance...

  • HT201401 volume control increases on its own

    volume control goes loud without touching it. anyone have this issue?

  • Reload webserver java classes

    Hi all, I am having trouble with my web server configuration. Specifically, I have a webapplication set up on a clustered system and rely on the .reload file within the document root to prompt the system to refresh it's Class cache. However, somehow,

  • Wsdl that references xsd's

    Hello experts, My wsdl has reference to a xsd. The problem is, when I try to import the wsdl, I do not see the entire request structure which is required while doing the mapping. I have both the wsdl and xsdu2019s in the same folder. I did go through