IR Report to update filtered records that are checked - How To

Hi,
(APEX 4.0 on 10g)
Simply stated, I have a IR Report with the followng
select
APEX_ITEM.CHECKBOX(1,empid,DECODE(selected_flag,'Y','CHECKED','') AS SELECTED,
ename,
job,
selected_flag
FROM emp
ORDER BY 1
The Interactive Report returns a 1000 records and none of the rows are selected (i.e. selected_flag is not 'Y'; I filter the report for last name = 'SMITH' which returns 100 rows.
How do I refer to those or updated the SELECTED_FLAG of the 100 rows with the last name of 'SMITH' to 'Y'?
Thanks in advance for your response.

Hi,
I don't know... it might be too late... but I came across this Problem too.
The trick is to select the the value of the primary key instead of the checkbox value...
something like this ...
select apex_item.checkbox(1, pn_modulid, decode
(V_SOMEVALUE 'J', 'checked', 'unchecked')) as "V_SOMEVALUE"
and...
apex_item.hidden(9,pn_modulid||',1:'||nvl(V_VALUE,'N')||',.... as checks
in the IR.
And then in the Process one can do something like this....
nid NUMBER;
nanz NUMBER;
ncount NUMBER;
vsql VARCHAR2 (32676);
vvar VARCHAR2 (100);
vvarray VARCHAR2 (1000);
TYPE reccheckboxen IS RECORD (
n_id NUMBER,
v_varray VARCHAR2 (1000),
v_varrayneu VARCHAR2 (1000)
TYPE tapcheckboxen IS TABLE OF reccheckboxen
INDEX BY BINARY_INTEGER;
tcheckboxen tapcheckboxen;
begin
--this is the value of my array from the hidden select...
FOR ds IN 1 .. apex_application.g_f09.COUNT
LOOP
vvarray := apex_application.g_f09 (ds);
nid := SUBSTR (vvarray, 1, INSTR (vvarray, ',') - 1);
tcheckboxen (nid).n_id := nid;
tcheckboxen (nid).v_varray :=
SUBSTR (vvarray, INSTR (vvarray, ',') + 1);
tcheckboxen (nid).v_varrayneu :=
REPLACE (tcheckboxen (nid).v_varray, 'J', 'N');
END LOOP;
FOR c IN 1 .. 7
LOOP
vsql :=
'begin :ncount := '
|| 'apex_application.g_f'
|| LPAD (c, 2, '0')
|| '.count; END;';
EXECUTE IMMEDIATE vsql
USING OUT ncount;
FOR v IN 1 .. ncount
LOOP
vsql :=
'begin :vvar := '
|| 'apex_application.g_f'
|| LPAD (c, 2, '0')
|| '('
|| v
|| '); END;';
EXECUTE IMMEDIATE vsql
USING OUT vvar;
tcheckboxen (vvar).v_varrayneu :=
REPLACE (tcheckboxen (vvar).v_varrayneu,
c || ':N',
c || ':J'
END LOOP;
END LOOP;
IF tcheckboxen.COUNT > 0
THEN
FOR verg IN tcheckboxen.FIRST .. tcheckboxen.LAST
LOOP
IF tcheckboxen.EXISTS (verg)
THEN
IF tcheckboxen (verg).v_varray <>
tcheckboxen (verg).v_varrayneu
THEN
vsql :=
'Update Table
set value = :01 where pn_modulid = :id';
EXECUTE IMMEDIATE vsql
USING vvalue, id;
END IF;
END IF;
END LOOP;
END IF;
end;
I had 7 Checkboxes to check in my report.
Works fine.... ;-)

Similar Messages

  • Need to process the records that are selected using checkbox in an ALV

    Hi ..
    I am displaying some data in an ALV using the Parent-child relation, the parent records has a check box which is input enabled.
    On click of a button on the toolbar, i need the checked records to be fetched and processed.
    Please help me on how to fetch the records that are checked..
    Thanks,
    Derek

    Hello Derek,
    Is ALV created using OOPS or using conventional FM?
    If you are making use of OOPS technique, then call this method:
    CALL METHOD <grid_name>->get_selected_rows.
    BR,
    Vishal.

  • Deleting the Records that are in odd position

    Hi,
       How to delete the records that are in the odd position.
    This is my program. Plz correct me. Iam not able to delete the records.
    REPORT  ZMTSHPRG19                              .
    TYPES:
    BEGIN OF TY_EMP,
    EMPID(4) TYPE N,
    ENAME(30) TYPE C,
    DEPT(4) TYPE C,
    SALARY TYPE I,
    END OF TY_EMP.
    DATA:
    FS_EMP TYPE TY_EMP,
    IT_EMP TYPE TABLE OF TY_EMP.
    FS_EMP-EMPID = '1009'.
    FS_EMP-ENAME = 'XX'.
    FS_EMP-DEPT = 'D100'.
    FS_EMP-SALARY = 10000.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = '1007'.
    FS_EMP-ENAME = 'YY'.
    FS_EMP-DEPT = 'D100'.
    FS_EMP-SALARY = '11000'.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = 1008.
    FS_EMP-ENAME = 'ZZ'.
    FS_EMP-DEPT = 'D200'.
    FS_EMP-SALARY = 12000.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = 1001.
    FS_EMP-ENAME = 'XY'.
    FS_EMP-DEPT = 'D200'.
    FS_EMP-SALARY = 10000.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = 1003.
    FS_EMP-ENAME = 'XZ'.
    FS_EMP-DEPT = 'D300'.
    FS_EMP-SALARY = 8000.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = 1002.
    FS_EMP-ENAME = 'YX'.
    FS_EMP-DEPT = 'D300'.
    FS_EMP-SALARY = 9500.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = 1004.
    FS_EMP-ENAME = 'YZ'.
    FS_EMP-DEPT = 'D300'.
    FS_EMP-SALARY = 9500.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = 1005.
    FS_EMP-ENAME = 'AA'.
    FS_EMP-DEPT = 'D100'.
    FS_EMP-SALARY = 10500.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = 1006.
    FS_EMP-ENAME = 'BB'.
    FS_EMP-DEPT = 'D200'.
    FS_EMP-SALARY = 12000.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = 1010.
    FS_EMP-ENAME = 'CC'.
    FS_EMP-DEPT = 'D100'.
    FS_EMP-SALARY = 15000.
    APPEND FS_EMP TO IT_EMP.
    LOOP AT IT_EMP INTO FS_EMP.
    WRITE:/ FS_EMP-EMPID,FS_EMP-ENAME,FS_EMP-DEPT,FS_EMP-SALARY.
    ENDLOOP.
    ULINE.
    DATA:
    LINE_COUNT TYPE I,
    W_REM TYPE I.
    W_REM = LINE_COUNT MOD 2.
    DESCRIBE TABLE IT_EMP LINES LINE_COUNT.
    SORT IT_EMP BY EMPID.
    IF W_REM = 0.
    LOOP AT IT_EMP INTO FS_EMP.
    WRITE:/ FS_EMP-EMPID,FS_EMP-ENAME,FS_EMP-DEPT,FS_EMP-SALARY..
    ENDLOOP.
    ENDIF.
    Thanks.

    TYPES:
    BEGIN OF TY_EMP,
    EMPID(4) TYPE N,
    ENAME(30) TYPE C,
    DEPT(4) TYPE C,
    SALARY TYPE I,
    END OF TY_EMP.
    DATA:
    FS_EMP TYPE TY_EMP,
    IT_EMP TYPE TABLE OF TY_EMP.
    FS_EMP-EMPID = '1009'.
    FS_EMP-ENAME = 'XX'.
    FS_EMP-DEPT = 'D100'.
    FS_EMP-SALARY = 10000.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = '1007'.
    FS_EMP-ENAME = 'YY'.
    FS_EMP-DEPT = 'D100'.
    FS_EMP-SALARY = '11000'.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = 1008.
    FS_EMP-ENAME = 'ZZ'.
    FS_EMP-DEPT = 'D200'.
    FS_EMP-SALARY = 12000.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = 1001.
    FS_EMP-ENAME = 'XY'.
    FS_EMP-DEPT = 'D200'.
    FS_EMP-SALARY = 10000.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = 1003.
    FS_EMP-ENAME = 'XZ'.
    FS_EMP-DEPT = 'D300'.
    FS_EMP-SALARY = 8000.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = 1002.
    FS_EMP-ENAME = 'YX'.
    FS_EMP-DEPT = 'D300'.
    FS_EMP-SALARY = 9500.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = 1004.
    FS_EMP-ENAME = 'YZ'.
    FS_EMP-DEPT = 'D300'.
    FS_EMP-SALARY = 9500.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = 1005.
    FS_EMP-ENAME = 'AA'.
    FS_EMP-DEPT = 'D100'.
    FS_EMP-SALARY = 10500.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = 1006.
    FS_EMP-ENAME = 'BB'.
    FS_EMP-DEPT = 'D200'.
    FS_EMP-SALARY = 12000.
    APPEND FS_EMP TO IT_EMP.
    FS_EMP-EMPID = 1010.
    FS_EMP-ENAME = 'CC'.
    FS_EMP-DEPT = 'D100'.
    FS_EMP-SALARY = 15000.
    APPEND FS_EMP TO IT_EMP.
    LOOP AT IT_EMP INTO FS_EMP.
    WRITE:/ FS_EMP-EMPID,FS_EMP-ENAME,FS_EMP-DEPT,FS_EMP-SALARY.
    ENDLOOP.
    ULINE.
    DATA:
    LINE_COUNT TYPE I,
    W_REM TYPE I,
    n type i value 1.
    DESCRIBE TABLE IT_EMP LINES LINE_COUNT.
    SORT IT_EMP BY EMPID.
    LOOP AT IT_EMP INTO FS_EMP.
    w_rem = n mod 2 .
    if w_rem = 0 .
    WRITE:/ FS_EMP-EMPID,FS_EMP-ENAME,FS_EMP-DEPT,FS_EMP-SALARY.
    endif.
    n = n + 1.
    ENDLOOP.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Apr 11, 2008 4:34 PM

  • How to store records that are entered in the fields?

    Hi friends can any one help me how to store the records that are given as input.
    Say if Empid - 123456, this 123456 has to be stored in table it will be stored but can any one help me with procedure?
    Thanks

    Hi,
    If the records are from an input file, you will have to first create a structure for the Employee id ....
    then, read the input file data into the internal table you have defined in the earlier step...
    then, loop at the records one after the other and update the records directly into the table....( typically this is a direct update of data and will be done when you were dealing with the data relating to a "Z" table )
    please follow the procedure and let me know how it worked for you or if you are still having issues on this.
    Thanks,
    Vishnu.

  • Report to display the contracts that are to expiry

    Hi experts,
                           I have to create a report to display the contracts that are to expiry for a given time period.
    can anybody tell me what are the tables and fields  involved. the module is MM.
    Thanks.

    Hi,
    you can refer the given below link
    http://www.sapgenie.com/abap/tables.htm
    Thanks
    Arun

  • Do I update my apps that are for IOS6 on my iPad 1?

    Do I update my apps that are for IOS6 on my iPad 1?

    The App store will let you update those apps for which there are applicable updates.  If an app does not update for you version of iOS you will not see an update as available.  Just tap the App store icon and then Updates in the lower right corner...if there are updates it will identify them.

  • Print only pages that are checked on page one??? Hidden is possible?

    Please help. I know a little about java and acrobat but not enough to do everything I want.
    I am making a form that has many pages but not all the pages apply to every event. So what I want to do is put a number of check boxes near the top of the form. When I print I only want the pages that are represented by the checked boxes to print.  Even better, I would like those pages not visible at all just print. For example: Page one is a form that one would fill out: name, address, phone number, etc. Near the bottom that person would check all that apply: page A, page B, etc. That’s all he would see but when printed, it prints out the form and any of the pages that are checked.
    Am I asking too much?
    Thank you for any and all help.

    It's possible to use a script to print only certain pages, but any contiguous page ranges have to be sent as a single print job. For example, to print pages 1-5, 10-20, and the single page 50, you would have to issue 3 separate print statements.
    It's possible to have non-visible pages (templates), but it's not possible to print them until they are displayed. Since Reader 11 now supports templates, it would be possible to display the selected pages in the order that you want, which would presumably be a single continous range of pages, which would then require just a single print statement, as opposed to multiple ones as described above.

  • If i have one iPad and I want all the apps that are there how do I copy that so i can have them on another iPad the same way as i have them on the first iPad?

    if i have one iPad and I want all the apps that are there how do I copy that so i can have them on another iPad the same way as i have them on the first iPad?

    If you want both iPad to be identical .....
    Without connecting your iPad to your laptop, start iTunes. Go to iTunes>Preferences>Devices. Check the box next to "Prevent your iPod etc. from automatically syncing." Click OK.
    Now connect your iPad to your Mac and start iTunes.
    When iTunes starts, right click on your iPad under Devices in the left column. Select Transfer purchases.
    After it finishes transferring all your apps to the Mac, right click on your iPad and select Backup your iPad.
    Sync the iPad and eject it when it is complete.
    Quit iTunes
    Connect the second iPad.
    Launch iTunes
    Right click on the iPad name on the left side and select - Restore from Backup
    Select the backup of the first iPad and let it restore from that backup.
    When it finishes restoring - sync with iTunes to transfer all of the apps and any other content that you want onto that iPad
    Eject the iPad when you are done.
    Check the second iPad and if all of the content did not sync as you wanted - or you want to remove some of the content - connect it again and then choose the content that you want - uncheck what you do not want - and click on Apply in the lower right corner of iTunes.

  • I imported photos as cat to new hard drive. Using "find" lightroom 5 can't see any photos that are PSD, how can I fix?

    I imported photos as cat to new hard drive. Using "find" lightroom 5 can't see any photos that are PSD, how can I fix?  I can see them in the folder using windows explorer.

    This is the first time I've asked a question using the forum.  Is my question understandable?

  • My picture folders that are checked are not synching on my iPad.  Why would that be?  I have had no issues in the past.

    When synching my pictures folders that are checked, the two that I added and checked will not appear on my iPad.  The folders that I have checked and added pictures, the new pictures also do not appear on my iPad.  I am not doing anything different.  There is no "Apply" to click on; just "Synch".  Any answers to this are appreciated!

    This article will help (about 1/2 way down).
    http://support.apple.com/kb/HT1212
    Barry

  • I can only play songs from the cloud that are checked with a dark checkmark-I have many other songs with a faint check that don't play

    I can only play songs from the cloud that are checked with a dark checkmark-I have many other songs with a faint check that don't play

    Restoring from backup will result in the iPod being like it was when the backup was made. If you restore via iTunes, you have to have all the synced media in your iTunes library since those are not included in the iPod backup.

  • Best approach to delete records that are not in the source table anymore.

    I have a situation where I need to remove records from dimensions that are not in the source data anymore. Right now we are not maintaing history, i.e. not using SCD but planning for the next release. If we did that it would be easy to figure the latest records. The load is nightly and records are updated and new added.
    The approach that I am considering is to join the dimension tables the the sources on keys and delete what doesn't join. However, is there perhaps some function in OWB that would allow to do this automatically on import so it can be also in place for the future?
    Thanks!

    Bear in mind that deleting dimension records becomes problematic if you have facts attached to them. Just because this record is no longer in the active set doesn't mean that it wasn't used historically, and so have foreign key constraints on it in your database. IF this is the case, a short-term solution would be to add an expiry_date field to the dimension and update the load to set this value when the record disappears rather than to delete it.
    And to do that, use the target dimension as a source table, outer join it to the actual source table on the natural key, and so your update will set expiry_date=nvl(expiry_date,sysdate) to set to sysdate if this record has not already been expired on all records where the outer join fails.
    Further consideration: what do you do if the record is re-inserted into the source table? create a new dimension key? Or remove the expiry date?
    But I will say that I am not a fan of deleting records in most circumstances. What do you do if you discover a calculation error and need to fix that and republish historical cubes? Without the historical data, you lose the ability to do things like that.

  • Sync: UPDATE on records that do not exist

    I have to similar cases that occur now and then:
    1. user syncs from PDA, record ends up in EQ with "Update/delete error :: no data found". (EQ DML: UPDATE)
    2. user syncs from PDA, record ends up in EQ with "integrity constraint (MIPSS.FK_EVENT__INSPECTION) violated - parent key not found" (EQ DML: INSERT)
    Data ending up in EQ is deleted from the PDA according to the user.
    Data is not accessible for deletion by anyone on the server side or on the PDA. I know that the last time this happened, the PDA user INSERTED (created) a new record (INSPECTION) and then UPDATED (edited) it before he did the sync. Is it possible that olite/Mobile server skips an INSERT when syncing or could there be something wrong with my publication?
    Marius
    Edited by: Marius H on Mar 24, 2009 4:08 AM

    The uniqueness of the seqno$$ values is within clientid and tranid$$, so it is possible for the same seqno$$ values to be in a ceq$ table for different users and/or transactions.
    In your example (assuming they are for the same clientid), tranid$$ 258 is the first upload (the tranid$$ increased for each sync for the same user), and therefore will need to be processed first. The seqno$$ value for the record for tranid$$ 258 looks like an update, rather than an insert from the range value (higher than the type I for tranid$$ 263) did you change the U to I when trying to fix the problem?
    the version$$ values in the cfm$/ceq$ tables do not always have real values
    if the record was uploaded as dmltype$$=I, the version$$ will normally be 1 (ie: first version of the record), but when the apply is done then if the PK does not exist, the record will be created and the cvr$ table inserted with version 1. If the PK does exist, then the record will be updated and the version value in the clg$ table added to.
    if a record was downloaded to the client it would have a version number from the server, and update to this would normally include this version number so that the apply can check that the update is for that version of the record when checking for conflicts where the data has changed on both the server and the client.
    If a record was created on the client and then updated, the version would probably be null as it is likely that this update would be changed to an insert when it is applied
    the -1 is possibly a second update to the same record
    When the apply process is done, the dmltype$$ from the upload is only used as a guide. for both I and U it tests if the PK exists and if so does an update, if not does an insert. for type D it checks the PK and if it exists, deletes the record, if it does not, then it ignores the record.
    The processing order is clientid, tranid$$, seqno$$

  • Conatinually asks to update plug-ins that are already updated?

    When I check my plugins, a few of them say to update due to vulnerability issues. Either some have been updated already and still ask to be updated or when they are actually updated and everything is refreshed, the plugins still show that they need to be updated.

    You don't need to do anything since Java 7 Update 51 is not vulnerable (afaik) and is the recommended version offered at http://www.java.com/en/download/manual.jsp and http://www.java.com/en/download/
    If you check the "[http://www.java.com/en/download/installed.jsp?detect=jre&try=1 Do I have Java?]" link at http://www.java.com/en/download/ and run the Java Detection applet it will tell you that you have the recommended Java installed (Version 7 Update 51).
    Related bugs:
    *[https://bugzilla.mozilla.org/show_bug.cgi?id=985968 Bug 985968] - Mozilla Plugin check page displays Java plugin as vulnerable even if the latest version is installed.
    *[https://bugzilla.mozilla.org/show_bug.cgi?id=985056 Bug 985056] - Java JDK 8 released
    P.S. The bug reports are for information only. Don't comment in bug reports unless you have something constructive to add (see [https://bugzilla.mozilla.org/page.cgi?id=etiquette.html Bugzilla Etiquette]).

  • TS3297 iphone will let me download apps but wont let me update the apps that are already downloaded. I get message saying that my iphone cant connect to itunes store. What should I do?

    im trying to fix this and have already synced my phone with itunes and restarted my phone, but nothing is working. does anyone know how to fix this?

    If only some of the songs on an album are giving you the authorisation message, that suggests those song files are damaged.
    If your country's iTunes Store allows you to redownload purchased tracks, I'd delete your current copies of the dodgy tracks and try redownloading fresh copies. For instructions, see the following document:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    Otherwise, I'd report the problem to the iTunes Store.
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the items that are not playing properly. If you can't see "Report a Problem" next to the items, click the "Report a problem" button. Now click the "Report a Problem" links next to the items.

Maybe you are looking for

  • Itunes 10.0.1.22 does not find Iphone 4

    i had the older itunes10 before downloading the new one acouple of days ago. when i went to sync my phone today, it didnt recognize my iphone 4 at all! i tried it all, ive been online for the past 5-6 hours trying to figure out why itunes doesn't see

  • How can I evaluate custom tag in custom tag output.

    Hi,           I have a custom tag which returns the following String           <html>           Hello there <util:getName/>           </html>           Currently the <util:getName/> just prints to the html page. What I           want is for that tag

  • Macro to call custom dimension

    Hi , What macro command i can use for showing the dimension members. like., MNU_ESUBMIT_MEMBERSELECTOR_E gives the list of all  members of entity dimension, I want to use this macro for calling a custom dimension P_Activity. Is there any code that ca

  • Get HTML page content as string in BPEL

    Hi! I would like to get HTML page content as string in BPEL via partnerLink. So, I define WSDL file for this partnerLink: <definitions targetNamespace="urn:GetSummaryContent" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:GetSummaryContent"

  • Abobe Creative Suite CS5 is blurry/pixellated on my new Mac OSX 10.9.4 Maverick

    The Abobe Creative Suite CS5 works fine on my work computer which is a MacBook Pro OS X 10.7.5 and worked on my old home MacBook OS X 10.9.4, but now I've updated my home computer to a MacBook Pro OS X 10.9.4 Maverick, all the programs are blurry/pix