Process Checkbox in Dynamic Report Row (APEX 4.1)

I have a dynamic report with the following source.
SELECT ut.user_id,
       ut.username,
       ut.login_attempts,
       ut.active,
       ut.employee_id,
       e.last_name || ', ' || first_name AS EMPLOYEE_NAME,
       fact_custom_auth.get_groups(ut.user_id) AS GROUPS,
       APEX_ITEM.CHECKBOX2(1,ut.user_id) AS CHK
FROM fact_users_tbl ut, employee_tbl e
WHERE ut.employee_id = e.employee_id
ORDER BY username;I have a button on the same page that I want to process the rows that are checked when I click it. I am using a Dynamic Action to do this. The dynamic action has 2 true actions, Execute PL/SQL Code and Submit Form. The button "appears" to do something when I click on it but the code in Execute PL/SQL is not doing what I expect it to do which is update the login_attempts to 0.
Here is the code for the Execute PL/SQL Code.
FOR i IN 1 .. apex_application.g_f01.COUNT LOOP
  UPDATE fact_users_tbl SET login_attempts = 0 WHERE user_id = to_number(APEX_APPLICATION.G_F01(i));
END LOOP;Where am I going wrong?
Edited by: MrPrice22 on Oct 18, 2012 3:04 PM
Edited by: MrPrice22 on Oct 18, 2012 3:18 PM

MrPrice22,
If I understand correctly, what your trying to do is to update the table fact_users_tbl as many times as checked rows you have when clicking a button.
My question will be: Why are you using an Dynamic Action instead of a "On Submit Process"?
About your code:
FOR i IN 1 .. apex_application.g_f01.COUNT LOOP
  UPDATE fact_users_tbl SET login_attempts = 0 WHERE user_id = 81;
END LOOP;I don't see any "COMMIT", so....
In the other hand, if you're executing the PL/SQL code before the submit the apex_application.g_f01 array may have no values cause the values have not been submited yet.
Try to use your Dynamic Action just to submit the page using the apex submit from the javascript API. That way you can submit the page and send a Request, then create a procedure that executes On Submit and add a condition for that procedure, this condition will be the Request that you send from the Dynamic Action.
javascript:apex.submit({request:"Process_Checks"})The easiest way to do this is just to asign the Submit Action to your button and create a On Submit Procedure that will be executed only when the button is clicked.
By the way, don´t forget to add a COMMIT
Try this and let me know if it works!

Similar Messages

  • Javascript popup in dynamic report

    Hello,
    I want to be able to use Javascript popup window from a dynamic report in Apex 4.0. Is there anything built-in to help me out? Or should I use my own javascript function in the header and call it?
    My idea would be that one column would have a icon with a link that calls a javascript function to popup a window.
    Any suggestions?
    Thanks all
    Btw, what is the markup for scripts, again?

    Try:
    javascript:popupUR

  • Dynamic Checkboxes on Interactive Report

    I have an interactive report that currently lists a row of values:
    Field1
    Val1
    Val2
    Val3
    I would like to place a text-field at the top of this interactive report with a submit button:
    [textbox] [submit button]
    Field 1
    Val1
    Val2
    Va3
    Then I would like to have checkboxes [] appear in each row:
    [textbox] [submit button]
    Field1 | Checkbox
    Val1 | []
    Val2 | []
    Val3 | []
    Then I would like to make it so that the user enters some text into the textbox and selects any number of the row checkboxes. Upon hitting submit, a procedure will run that accepts each Field1 value and inserts a record into a table containing 2 fields: the Field1 value and the textbox text.
    So the following user input:
    [Test text in the textbox.] [submit button]
    Field1 | Checkbox
    Val1 | []
    Val2 | [x]
    Va3 | [x]
    After hitting the submit button, a procedure would be called that would insert 2 records into a table:
    Field1 | Field2
    Val2 | Test text in the textbox.
    Val3 | Test text in the textbox.
    Note that there is no entry for Val1 because its checkbox was not checked when the user pressed submit.
    What can I do to make this happen? I appreciate any help you can offer.

    Thanks for sharing
    I am having exactly the same problem.
    I have an interactive report with the following SQL.
    select RSN_CD,
        DESC,
    APEX_ITEM.CHECKBOX(1,RSN_CD) "Select"
    from CAN_RSN
    I've set the 'Select' column's type to 'Standard Report Column'.  But the checkbox does not appear on the report. 
    Apex Version: 4.0.1.00.03
    Thanks.

  • How to change report query dynamically in Oracle APEX?

    Hi,
    I want to dynamically change the where condition in APEX report query. Can anyone help me solve my this problem?
    (Just want to change the query which we change in Oracle Reports using lexical parameter to change &Where, &Order by etc. dynamically!!)
    Thanks, Praful

    Hi
    I've been using flexible queries in APEX for a few years now, and your question just added a whole new dimension to the flexible and powerful nature or writing reports in APEX.
    While APEX Interactive reporting has almost completely removed the need the equivalent of Lexicals in Oracle Reports, I thought it might be fun to try and use lexicals in an APEX report.
    Before we start I should summarise the powerful capability of APEX reporting to have oprtional parameters (lots and lots of them if this is needed).
    For each parameter, you simply add a page item which will hold the value of the parameter.
    The item/parameter can be populated by typing in the value, defining an LOV, using a date-picker etc.
    To make the parameter optional simply use an OR in the where clause.
    So for a apge item P200_PARAM1.....include
    WHERE (:P200_PARAM1 IS NULL
    OR COLUMN1 = :P200_PARAM1)
    This way you can either leave the page item null or type in / select a value from a LOV.
    There is a small quirk in APEX LOV's which sometimes returns a value of '%' or '%null%' - depending on the version - when no value is selected.
    See Patrick Wolf's solution for this at Re: Null value handling in LOVs
    I include this Application Process in all my APEX applications ;)
    Now let's look at using the equivalent of Oracle Reports Lexicals......
    First-off - this is based on the APEX SQL report - NOT Interactive Report.
    It relies on the fact that you can let the query be parsed only at runtime.
    1. Define an SQL report entering the 'core' of your query.
    With a query like SELECT ENAME, JOB FROM EMP
    Select 'Generic Columns' option in the 'Column Headings' section
    Finish the report creation
    2. Define a page item - say P200_LEXICAL - type text on the page
    3. Edit the report and update the SQL query to include your lexical page item
    SELECT ENAME, JOB FROM EMP &P200_LEXICAL. (REMEMBER THE '.' AT THE END)
    Ensure that the option "Use Generic Column Names (parse query at runtime only)" is selected at the bottom of the query
    4. Add a button to the page -using 'Create a button displayed among this region's items' the will submit the page.
    5. Run the page - you will see all the employee names and job desdriptions
    6. Enter a where clause into the 'Lexical' textbox - say "WHERE ENAME LIKE 'K%'" and click the 'Go' button
    Voila! your where clause is magically applied.
    Try any variant you like adding an ORDER BY clause etc...... this is FUN!
    7. Clear the value of the LEXICAL and click go.
    Edit the report and move the &P200_LEXICAL. into the selected columns (or add another one)
    SELECT ENAME, JOB &P200_LEXICAL. FROM EMP
    8. Run the page
    Enter ",SAL" in the textbox and "Go"
    We can add as many columns as we like (subject to the "Maximum number of generic report columns:" set below the SQL query in the report edit section)
    Now because we have all the flexibility in APEX of setting page items using SQL or PLSQL you can set the value of the lexical programatically, or just pre-set a few values in an LOV - the options are limitless.
    While I've never had the need to use lexicals - you can see that APEX provides the most Flexible Lexicals in town.
    Eat your heart out "Oracle Reports"!!!
    Have fun
    Mike

  • How to put checkbox into classical report header row?

    Hi,
    I have a classical report that has a check item as a first column. I would like to put a check box item into the header row too, When checked it is supposed to set the check box item in all report rows. Something like in APEX Shared components / Links / Grid Edit.
    Is this possible to do? TIA.
    Tamas

    Hi,
    See e.g. this post
    Re: Tabular form check all checkbox header
    Regards,
    Jari

  • Checkboxes displayed as diamonds when running reports in APEX

    I read and implemented the steps offered in other postings on this subject and the checkboxes appear fine when I run the report locally on my PC. However, when I run the report in APEX (not through web service), the checkboxes are still not showing up. This is after uploaded the Wingdings font to the BI Publisher server; did the font mapping and defined the Property for RTP Template/ Characters used for checkbox to: Wingdings;254;111.
    Does anyone have the solution to this?
    These are the versions we're using:
    Application Express 4.0.2.00.07
    Oracle BI Publisher 11.1.1.5.0
    Thank you.

    Hi,
    Give it a try by using the close and dispose method for report object and also use the GC.collect.
    Hope it helps!!
    Amit

  • Can't delete row in updateable detail report in apex 4.0

    i build a master detail form.i insert record in master form and in detail updatable report. but when i delete record in the updatable report then message display 1 record delete but the record is still display in the updatable detail report.

    I request you not to keep starting new threads for the same problems while igonoring the earlier ones.
    If your question is not answered keep progressing the same thread.
    Your earlier thread on this subject, in case you have forgotten ti , is can't delete record in detail updateable report in apex
    Regards,
    Just in case you have not noticed this already , you can set your posts as "watched" automatically. heres how:
    1. Go to your Control Panel
    2. Click on "Your Settings"
    3. Set the two Radio button for wathc to Yes and save.
    Next time when you login you will be able to see your Watches on your Control Panel and in the main forum Thread List they will appear with binocular icon.
    Regads,
    Edited by: Prabodh on Aug 23, 2010 3:58 PM

  • Uncheck a Checkbox in a report

    How do!
    I need a bit of help.
    I have a dynamic report with checkboxes. When a row is checked, it will insert that row into a table.
    BUT what I need to know is how do I delete from this table if the check box is unchecked????
    Is there an APEX built in function which searches unchecked rows?
    Please help as its pretty urgent.
    Sam

    Problem sorted.
    Simply create a cursor loop. See if any of the returned values are != to any in the check boxes. If so, delete them

  • Report Row With Detail (AJAX) by Carl - How to implement?

    I just had a look at Carl's example place and I'd like to implement his Report Row With Detail feature. But how, it's made up of 3 sections:
    1. a query
    2. javascript
    3. application process
    The query on which the report is based and where I want this feature is:
    select leverancier, artnr, vendorcode from plijst where productgroep = :p1_assortiment_tree or subgroep = :p1_assortiment_tree
    A break is defined on Leverancier
    I understand the query and the application process part. But where goes the Java part???
    Peter
    Message was edited by:
    Pete

    Tried to upload your example application, unfortunately it does not seem to upload properly in my APEX v2.0 environment
    Can you please confirm if your example works with APEX version 2
    and does the Javascript go in the Page Header or Region Header/ Footer area
    thankyou
    Frank

  • Dynamic Action in APEX 3.1.2

    Hi All,
    I am trying to achieve dynamic action in apex 3.1.2 without refreshing the page. I have 2 pages, In page 1 I am opening page 2 which returns an html text to an hidden value which is working fine up to this part. I am trying to show the return html tag using display item. So I am trying achieve this using following code, but is not working please help me.
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
    <script type = "text/javascript" >
    function refreshdata()
    {  var tmp = new htmldb_Get();
    tmp.add('P123_DISPLAY_HTML'', $v('P123_DISPLAY_HTML''));
    tmp.get();
    $('#DISPLAY_HTML').trigger('apexrefresh');
    </script>
    I have added “DISPLAY_HTML'” as div in of display item like this.
    Pre element text
    <div id="DISPLAY_HTML">
    Post element text
    </div>
    It is displaying text if I manually refresh the page which I want to avoid.
    Anyone’s help is much appreciated.
    Regards

    Hi,
    Your code just set item P123_DISPLAY_HTML value to session state.
    It do not call any on demand process that could return something.
    Below code do not do anything else than trigger custom event in APEX 3.x. There is nothing out of box that bind to that event.
    $('# DISPLAY_HTML').trigger('apexrefresh');Maybe this old Carl's blog post help you to right direction
    http://carlback.blogspot.com/2007/12/apex-ajax-reports-and-you-and-bit-of-31.html
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Very intermittent missing page regions / report rows / page item values

    My goals in making this posting are twofold:
    1. I'm looking to see if anyone else has experienced this type of issue before.
    2. I'm looking for ideas about what can be done to debug such an infrequent bug with serious implications.
    Synopsis
    I'm having a weird problem where very infrequently I will load a page and I'll notice that one or more page regions, report rows, or page item values are missing. If I reload the page the missing parts appear as they normally should.
    By "very infrequently" I would say it happens to me somewhere between 1 in 100 and 1 in 1000 page loads, of course at my last project demonstration in happened twice in 10 minutes to my demo participants. I've attempted to debug this, but most of the techniques I know of involve reloading the page or reposting the form data and (of course) everything looks fine then.
    Environment
    * This has happened on multiple different pages, under ApEx 3.1 (Linux) and 3.2 (Solaris).
    * I believe that so far I've only ever seen this under Firefox 3/3.5 under OSX, but since I do the vast majority of my development with this browser it's not reasonable to conclude that it only happens under Firefox.
    Logs
    * No application errors during this timeframe.
    * Nothing of significance in the database alerts log (just thread notes and log sequences).
    * Nothing of significance in the webserver log (just the usual mod_ossl connection errors).
    Thanks for your attention,
    Jason
    Edited by: Jason G on Jul 24, 2009 12:43 PM

    Well, thanks for reading the post anyway.
    While working through some debugging steps I realized that I was populating some of the regions as the page rendered using AJAX -- this would pause the page rendering until the AJAX request returned. I believe that a hanging AJAX call was the likely culprit of the very intermittent symptoms I was seeing.
    I moved the AJAX calls to the last region of the page and added a javascript function that "watches the page load" by checking for regions by ID and looking at javascript boolean flags to let me know when the page is fully rendered. If this process takes longer than 5 seconds it notifies the user that something happened and offers to reload the page for them in an effort to fix the issue.
    So far, so good -- but it will take a lot of testing to convince me that this case is solved. I hope my documenting this is helpful for others in similar situations.
    Good luck,
    Jason

  • Edit a dynamic report

    I need to create a report based on a dynamic query that I can edit then. So I create a form and report but when I click on the edit button I don´t see any data of the row.
    How can I do that?

    I need to create a report based on a dynamic query
    that I can edit then. By 'dynamic query', do you mean you're creating the query SQL at runtime? If not, please clarify.
    So I create a form and report
    but when I click on the edit button I don´t see any
    data of the row.
    How can I do that?I assume you mean, when you click the edit icon on a report row? This is pretty standard Apex functionality. What do you see when you float your mouse over the edit icon? Does it show a page item name and value near the end of the URL?
    Earl

  • Custom report row template

    Few questions when using a custom report row template. Followup to the discussion Report Row Template: Column condition
    1. The row template allows full control how the entire row is rendered. I can see this being used when the report query returns a single row and we need to format it in a very specific way. But when the query returns multiple rows, how is the specified Row Template used? i.e the first row is "consumed" and rendered as per the template. If the same process is repeated for subsequent rows, how can we control whether successive rows are rendered across the page (left to right) or down the page (top to bottom)?
    2. When a custom row template is used to render a tabular form, the hidden columns (marked Edit=Y, Show=N on Report Attributes) are present in the markup even when they are not specified in the row template! i.e. the MRU process works. Of course, this is a good thing but I was curious to know what exactly controls this, what part of the report template controls where the hidden form elements are placed?
    3. Any number/date formatting specified declaratively on the Column Attributes page appears to be taken into account when column values are substituted in the template using #COL# notation. But all the other Column Attributes are ignored (alignment, sum, show, link, etc). Is there a way to use the Link attribute to declaratively specify the link so the value of the column #COL# as seen by the report template includes the A tag?
    Thanks

    Comments? Thanks

  • Calling Oracle Discoverer Report from Apex

    How to call Oracle Discoverer Report from apex application?
    Thanks!

    The report is on a different data base ... need to create a process to get the data into the view behind the report and then materialized view in Apex etc .Then recreate the same report in Apex. But I am trying use the disc report url to invoke the report directly from apex.
    Any suggestions or thoughts are greatly aprreciated.

  • Report Row With Detail (IFRAME)

    Hi,
    I am trying to implement the Report Row with Detail but not successful.
    I have gone thru the various threads in the forum.. but i am unable to
    get it. It would be great if I could know the step by step process to do the same.
    I have created two regions. The first region (the query to it) also
    has a show_region link.. I have copied and pasted the javascript given
    by Carl.
    Thanks,
    shilpa.

    Hello,
    Ok then you are almost there so when you submit the form to update your data on a sucessful save you are going to create a plsql region that just uses htp.p() to write out the javascript to update the report in the main page.
    a simple example would be something like this.
    Lets say I'm getting back values to update the two first table cells on my parent report.
    <script>
    /*set up call back function*/
    function ReportRowUpdate(){
    var lRow = parent.g_LastRowOpened; /* hook to last row clicked */
    lRow.cells[0].innerHTML = 'SOME VALUE FROM DATABASE 1';
    lRow.cells[1].innerHTML = 'SOME VALUE FROM DATABASE 2';
    /*call call back function*/
    ReportRowUpdate();
    </script>
    And that should be it.
    Carl
    Message was edited by:
    Carl Backstrom

Maybe you are looking for

  • EPUDL popping up all the time in dock

    Hi, 13" MBP running newly installed Yosemite OSX. I had Epson drivers installed and printer worked fine. Since installation of new OSX, EPUDL, which I gather is part of Epson software keeps popping up in the dock, every 20-30 seconds then disappears.

  • Multi Mapping : How to get Message count after splitting

    Hi all, I am following below blog. /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi Can any body please tell me how to get the count of messages generated after splitt

  • Apple Lightning to 30-Pin Adapter and 1st generation connector

    Will an Apple Lightning to 30-Pin Adapter allow an iPhone 5 to charge from a 1st generation connector? When I plug my old iPhone 3s directly into my 2006 Lexus LS430 connector, the iPod function will work but not charge. This is apparently because 1s

  • Managed Bean in Task Form

    Hi!Oracle Fusion Middleware 11.1.1.5.0, Oracle JDeveloper 11g. I post this thread in this section because of the type of project I am working in (SOA Application). I am trying to customize a BPEL Task Form. After I made a project using Fusion Web App

  • Where is the Lion download stored?

    Just finished downloading and installing Lion on my iMac. I'd now like to install it on my MBP, but really don't want to download another 3.7 gigs of data. Where is the download stored? Is it saved after installation?