Capturing the row selector and perform logical delete

Hi All ,
I add a tabular report in one of my page .But in the MULTI_ROW_DELETE button I like to capture the checkbox (row selector) and fire a PL/SQL anonymous block where rather than performing actual row delete it will update a database field and perform some sort of logical delete .
Now my problem is I cant able to capture that what are the rows need to be logically deleted :
DECLARE
vRow BINARY_INTEGER;
BEGIN
FOR i IN 1 .. apex_application.g_f01.COUNT
LOOP
vRow := apex_application.g_f01(i);
update test123 set delete_flag='y' where col2=vRow ;
end loop;
end;
Its throwing error .Can anyone help on this pls how to write the pl/sql code to perform the logical delete.
Thanks in advance ,
Regards,
Debashis.

Guys ,
Got the solution by searhcing several of the therads from Denes...
Create the checkbox from Form page :
htmldb_item.checkbox(1,t.USERNAME) DeleteItem,
and then captured it as :
FOR i in 1..HTMLDB_APPLICATION.G_F01.count
LOOP
UPDATE table1 set DELETE_FLAG='Y'
WHERE USERNAME = HTMLDB_APPLICATION.G_F01(i);
END LOOP;
Cheers,

Similar Messages

  • JQuery and the row selector column.

    I have a tabular form which i'm running some validation against.
    I'm using the row selector to indicate rows which are to be deleted.
    Now i've deleted rows using the method below, that's fine.
    DECLARE
    rows_int integer;
    Err_message varchar2(50);
    BEGIN
    FOR i IN 1..apex_application.g_f01.COUNT LOOP
    DELETE
    FROM com_transactions
    WHERE ID = apex_application.g_f02(NVL(apex_application.g_f01(i),0));
    END LOOP;
    END;
    However when i try to use JQUERY for the validation things go awry.
    $('input[name="f01"]').each(function(j)
    if($(this).val().length > 0)
    {   row_var = $(this).val();
    $('input[name=f06]:eq('+(row_var)+')').val(' DELETE ROW '+ row_var);
    Now there's a mis allignement on the returned values j = 0 returns the values in row 1 when using pl sql, but that's fine.
    The problem is that in the plsql block only the rows with a tick against them are returned but in the jquery every row is returned regardless of if it's been ticked or not.
    Any ideas please folks?
    Thankyou
    JH.

    Having done a bit more research i was accessing the item incorrectly and needed to use the following syntax.
    $('input[name=f01]:checked').each( function(){
    JH.

  • Is there a way to programmatically check the Row Selector for a row?

    Greetings,
    I have a report that has the Row Selector column. I am processing the rows that are checked by the user when they click a button, so I am already looping thru FOR ii IN 1 .. Apex_Application.g_f01.COUNT.
    I need some of the rows to always be processed in the loop, so I would like to:
    1. have certain rows checked automatically. Is that possible?
    2. using the same logic that automatically checks certain rows I would also like to insure they stay checked, or are process in the loop. (You know, I may automatically check certain rows, but the user may uncheck them.) So, even if the user doesn't check them, I would like to programmatically check them before the FOR ii IN 1 .. Apex_Application.g_f01.COUNT looping occurs.
    3. If it is possible to prevent the unchecking of a row that is automatically checked it would be awesome and would mean that requirement 2 is moot. If that's possible let me know. That would be sweet. :-)
    I hope that makes sense, and that you understand what I need to do. If not, let me know.
    Thanks in advance for your help, Tony

    Hi Shunt,
    That's a great help ! ! ! Thanks much ! ! ! :-)
    I did some additional research from what you told me, and I found out that the apex_item.checkbox is a page item and it is included in the SQL that builds a report. Your code got me on the right track. That's great. Also, it's great to know I can do what I need. My next question is 'How do I get there from here?' :-)
    I built my current report using the report builder, then used the trick to change it to a type of 'SQL Quey (updatable report)' just so I could click the setting to add the checkbox column, then I set the type back to 'SQL Query'. So, I don't have apex_item.checkbox in my SQL. I guess Apex (thru its magic) prepends it to the SQL somewhere along the way. What do I need to do now?
    Do I need to rebuild the report without using the above 'trick' and code the checkbox into my SQL myself? Or, can I just add it to the existing SQL? Or, with that cause 2 checkboxs to be on the report (mine and the one Apex generates)? That's one set of questions. :-)
    Also, whether the checkbox is checked (and disabled) is based on a value in the table the SQL is running over. Would it be possible to put a subselect, or something along those lines, in the main SQL (that has the checkbox item) that would programmatically check the checkbox?
    Sorry for my newbie questions, but I'm relatively new to Apex and PL/SQL, so there's still a lot I have to learn. All you need to do is point me in the general direction and I'll take it from there. I just want to know the right way to go about this before I start coding. :-)
    To give you and idea of what I'm doing now and want to do I have my simple SQL below:
    = = =
    select
    ecn_approval_master_id, mandatory, approval_type,
    htmldb_item.hidden(50,ecn_approval_master_id) idalias
    from
    ecn_approval_master
    where ecn_plant_master_id = :P0_PLANT
    order by mandatory DESC, approval_type
    = = =
    The 'mandatory' column contains 'Y' or 'N'. If it is 'Y' I want the checkbox to be checked and disabled. If it would help in the coding I could have the values of the mandatory column 'Y' and NULL. But, I'm not sure if it will help, because it looks like the checked rows are listed in parm 4. Then, when the htmldb_application.g.f10.count.... routine processes the selected they mandatory ones will automatically be processed. Course, you probably figured that out already.
    Thanks, Tony

  • The operating units and inventory organization deleted form the system

    I am defining new instant on oracle finance
    First I have create Business group, Operating unit, inventory organization
    Then I create the accounting setup and compete it
    Went to operating unit tab of the accounting setup and complete it also
    After that I try to configure the oracle payable
    In the payable option when I try to select inventory organization , the inventory organization is not there
    Then I check it in the global HRMS manger, in that the operating unit I already created are not appearing
    What is the error I have done
    Why the operating units and inventory organization deleted form the system

    Pl post details of OS, database and EBS versions, along with which document you are following to perform all these setups.
    HTH
    Srini

  • Capture the rows selected ,tableView

    Hi Friends,
    I have a requirement and i was searching in the forum and i have seen the same question been asked 
    Capture the rows selected in a multiselect table view (BSP)   but i couldn't able to judge how the thread is closed
    We have a tableView that is filled on selecting a value from a dropDownListBox.
    and now i select some rows from the table view and click on a button(say btn_ok)
    now the data is processed .
    now what is my requirement is when   i again run the page and select the same drop down value i want to see the rows to be already selected for which i have done before
    example
    dropdown -
    > a is selected
    table view
    1----> selected
    2
    3---->selected
    4
    5---->selected
    6
    btn ok
    next time i want to c these selected rows already as SELECTED
    Regards
    Bhavana

    Hi,
    Are you able to fetch single row? If yes then debug and try to solve it. I don't have SAP System right now but this will help you. First change your table selection mode "Multiple". After that write following code in your "OnInputProcessing"
    Sending Selected Field to the calling Screen
    DATA : tv      TYPE REF TO cl_htmlb_tableview,
           tv_data TYPE REF TO cl_htmlb_event_tableview,
           event   TYPE REF TO cl_htmlb_event.
    tv ?= cl_htmlb_manager=>get_data(
            request = runtime->server->request
            name    = 'tableView'
            id      = 'tv_field' ).
         RECEIVING
           data    = tv.
    tv_data = tv->data.
    w_field = tv_data->row_key.
    Where w_field is your field name. By the way this I used to get one row. Try debugging and may be you will find your way.
    Thanks,
    Muhammad Usman

  • Hi, I have the iphone 4 and I manually deleted all the voice memos on my iphone but they are still on my iphone when I open Itunes

    Hi, I have the iphone 4 and I manually deleted all the voice memos on my iphone but they still appear on my iphone when I open Itunes on my computer and they still take up space. I am soon running out of space. Any ideas to permanantly get rid of some of the voice memos?
    Am I the only one that really dislike the fact I cannot customize my iphone and cannot delete whatever files I want?
    The only options i seem to have is to delete all my files WITHOUT a system restor because I tried doing a system restore  and it puts back all my old files on my iphones.
    I'm pretty desperate and any tips would help me a lot

    If I understand you correctly, you purchased two albums directly from your iPhone and have successfully transferred the purchases to your iTunes library, but now you want to remove these two albums from your iPhone but having trouble, correct?
    If so, you can manually delete the albums (song-by-song) by sliding your finger across each song's name, from left to right, then select the Delete button.
    Or, while your iPhone is connected to iTunes click on the Music tab that you see in iTunes (where you specify what items to sync to your iPhone). At the bottom of that window (below Playlists, Genre, etc.) you'll see songs that are "manually" added to your iPhone, just un-check those and re-sync.

  • How to print the row  ,column,and particular cell in separate color

    how to print the row  ,column,and particular cell in separate color IN ALV GRID

    HI,
    Here you go good program links
    <a href="http://www.sapfans.com/forums/viewtopic.php?t=52107">How to Set Color to a Cell in AVL</a>
    <a href="http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm">ALV Grid Coloring</a>
    Thanks
    Mahesh

  • I just upgraded to the iPhone 6 and before I delete my old phone, I want to make sure all my photos were in icloud, but I can't find them anywhere. Why? I know it may take weeks to download my 14,000 pics, but I want to make sure they're there.

    I just upgraded to the iPhone 6 and before I delete my old phone, I want to make sure all my photos were in icloud, but I can't find them anywhere. Why? I know it may take weeks to download my 14,000 pics, but I want to make sure they're there.

    Extract the photos from the phone to your computer like you would with any other digital camera.
    PhotoStream is NOT permanent storage and iCloud photos is in beta, meaning it's not fully cooked yet and you may lose data stored in it.

  • PWA 2010 timesheet: 2 different colors for the rows "Actual " and "Planned

    Hello,
    To make timesheet easier to read and fill, is it possible to have 2 different colors for the rows “Actual “ and “Planned”?
    Thanks,
    soudha

    Hello Soudha,
    By default the timesheet grid shows the cells in white color. But if you have little coding skills or a developer at your end, you can try this using "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\JsGrid.js" java
    script file.
    You may have to modify it but I recommend to take a backup of the file and test in your test environment first.
    Happy troubleshooting.....
    Vikram Daruru - MSFT

  • I have just connected my computer to my iPad to import photos to my iPad and have imported the wrong ones and wish to delete them. Does anyone know how I do this please. I am a novice at this as I have ony just acquired my iPad,

    I have just connected my computer to my iPad to import photos to my iPad and have imported the wrong ones and wish to delete them. Does anyone know how I do this please. I am a novice at this as I have ony just acquired my iPad,

    Photos that were synced from your computer using iTunes can only be deleted by de-selecting them from the folder from where they were synced -  and then re-syncing.
    Connect the iPad to the computer and launch iTunes.
    Click on the iPad name on the left side under devices.
    Click on the Photos Tab on the right.
    Uncheck all of the albums that you want to remove under the Sync Photos From heading
    Click on Apply in the lower right corner of iTunes
    If you are using iTunes 11 and you can't see the sidebar go to View>Show Sidebar from the menu at the top.

  • Characteristic KNDNR is no longer in the  field catalog and will be deleted

    Hi ,
    we are doing System Landscape optimisation project  and the issue is as follows
    In account based copa when i run the KE30 report , i am getting the message in the target  system
    'Characteristic KNDNR is no longer in the  field catalog and will be deleted'
    In the source system (production system), the customer characteristic is available as a variable in the characteristic list as an option and can be selected in the KE32 t code.
    the customer is available in the KE30 report (source system) and it can be drilled down on the basis of the customer but it  is not possible in the target system
    in the Target system (to be production system) the customer characteristic is not available as a variable for selection in the KE32 report under the characteristic list.
    i checked the ke3e t code in both the source and the target system and the characteristic KNDNR is not available as a variable
    I checked the KEA5 and KEA0  t code in both the source and the target system , the customer characteristic is not available
    thanks in advance
    kind regards
    sap student

    Hi,
    Are you trying to create a report from a Form? When are you getting this information? At the time of creating the form (KE34) or report (KE31)?
    I have not seen this message though, can suggest to check if the required characteristic is there in KEA0, KEA5 and also if adding that in KEQ3 helps.
    Regards,
    R C Sabat

  • HT1926 I am trying to delete an old version of itunes in my ibook G4 so I can install the newest version and can not delete the old version because it says I don't have enough privileges, help?

    I am trying to delete an old version of itunes in my ibook G4 so I can install the newest version and can not delete the old version because it says I don't have enough privileges, help?

    iTunes is not installing because its incompatible with your OS. When installing the correct version the new version will update the older version, there is no need to uninstall first.
    The last version of  iTunes compatible with OSX 10.4 is iTunes 9.2.1
    You can down load iTunes 9.2.1 here:
    iTunes 9.2.1

  • I have songs that show up on my device, that come up grey with the dashed circle, and cannot be deleted.

    I have songs that show up on my daughter's device, that come up grey with the dashed circle, and cannot be deleted.
    I have tried:
    Try:
    - Reset the iOS device. Nothing will be lost      
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync/delete all music and resync
    To delete all music go to Settings>General>Usage>Storage>Manage Storage>Music>Tap edit in upper right and then tap the minus sign by All Music
    - Reset all settings                            
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                               
    iOS: Back up and restore your iOS device with iCloud or iTunes      
    - Restore to factory settings/new iOS device.        
    This has not helped.
    All music is off the ipod.
    When I connect to the computer to sync I still have songs that come up grey with the dashed circle.

    If they were deleted from the computer and iTunes, the only way to listen to them again would be to insert the CD and listen to them from the CD or rip them from the CD again.

  • My iPhone says that I don't have enough storage to update one of my apps so I went to delete stuff that I didn't need but every time I select what I want to delete my phone freezes, goes back to the home screen and doesn't delete anything.

    My iPhone says that I don't have enough storage to update one of my apps so I went to delete stuff that I didn't need but every time I select what I want to delete my phone freezes, goes back to the home screen and doesn't delete anything.

    First thing to try is to reset your device. Press and hold the Home and Sleep buttons simultaneously ignoring the red slider should one appear until the Apple logo appears. Let go of the buttons and let the device restart. See if that fixes your problem.

  • Capturing the row count

    How can we capture the row count of the rows affected by executing an update statement?

    If you are doing this by PLSQL block:
    declare
    v_num pls_integer := 0;
    begin
    for c_rec in (select id
    from table_name
    where ...)
    loop
    update other_table
    set col_name = ...
    where fk_id = c_rec.id;
    v_num := v_num + 1;
    end loop;
    dbms_output.put_line ('Total count is '||v_num);
    end;

Maybe you are looking for