Interactive report case triggering a dynamic action

Hello

My interactive report is built, based on the following query

SELECT ID_OPERACION, NOMBRE_CLIENTE, TOTAL_PAGAR, APEX_ITEM. CHECKBOX (1, O.ID_OPERACION, "onclick ="f_UpdateCollection (this)"', a.c001") "Seleccionar"

OPERACIONES o, apex_collections a

WHERE the a.c001 (+) = O.ID_OPERACION

and a.collection_name (+) = "OPE_COLLECTION".


I use a collection because I don't want to lose the selected controls caused by paging.


I would like to add a dynamic action that each time check box is selected, an element (P5_TOTAL_SELECCIONADO) summarizes the column TOTAL_PAGAR of all the checkboxes that are selected and each time a checkbox is unchecked the Total_seleccionado subtracts the value of the selected item.


How can I do?

Hi Eva,

Please check again your application and see if it's what you thought.

I made a few changes. First, here you were talking about P5_... the elements in your workspace apex.oracle, the page number is 1, so I changed the P5_... elements of P1_...

Then, you let the fire on the boxes page laod on, but you don't want t function to begin to evaluate during page loading.

There were also a few errors in the javascript code, I suggested. The VALOR_PAGAR selector was not correct, I've changed a little bit. Also all selected text values are strings and adding javascript strings will be just concatonate them. I made string number conversion for you, also taken into account that null values (P1_TOTAL_SELECCIONADO on page loading is null) cannot be cast to number.

The result is:

var VALOR_PAGAR = $(this.triggeringElement).closest('tr') .find ('td [headers = "VALOR_PAGAR"]') .text)

var TOTAL_SELECCIONADO = $v ('P1_TOTAL_SELECCIONADO')

VALOR_PAGAR = (isNaN (parseInt (VALOR_PAGAR) = VALOR_PAGAR)? 0: VALOR_PAGAR)

TOTAL_SELECCIONADO = (isNaN (parseInt (TOTAL_SELECCIONADO) = TOTAL_SELECCIONADO)? 0: TOTAL_SELECCIONADO)

var total = VALOR_PAGAR + TOTAL_SELECCIONADO

$s ('P1_TOTAL_SELECCIONADO', total)

This is the code to add checkboxes checked, false action is the same except for total, which is:

var total = VALOR_PAGAR - TOTAL_SELECCIONADO

Kind regards

Vincent

Tags: Database

Similar Questions

  • How to change a button label using a dynamic action?

    I have a button 'toggle' to filter active only on an interactive report.  I use dynamic measures to filter the report in function when you press the button... the problem is that when I click on it, I want the button label to say "All" instead of "Active only"... don't want to have to create 2 buttons and actions separate and other.

    I put the label must be a hidden element and P11_BUTTON_LABEL.

    I update the region, but the change button only when I refresh the page my hidden item is changed.

    have a dynamic action of the 2 step

    (1) pl/sql to set values

    (2) the region of refreshment

    This is Apex 4.2.4.00.08 on DB: 11.2.0.1.0

    Thanks in advance,

    Scott

    In your dynamic action, add a javascript to execute action, follow these steps in action:

    $("#TEST_BUTTON").attr ('value', 'DAMIFINO');

    Where TEST_BUTTON is the static Id of your button (you can set it to the definition of the button) and where DAMIFINO is the string you want to take...  You could write some javascript so so statement to switch the value depending on whether it is all or only active...

    Thank you

    Tony Miller
    Software LuvMuffin
    Ruckersville, WILL

  • custom not pulling dynamic action

    Using Apex 4.2.2 on 11g

    I have a standard report A1

    There is a link to the A1 report column which updated the action dynamic table C1 using a custom.

    The link of the report A1 column has the value javascript URL: $.event .trigger ('RefreshTrend_2', [{key_2:' #COL01 #'}]);

    and there is a dynamic action RefreshTrend_2 D1, which sets the value of the graphic filter P17_KEY_2 to the value of the key_2 variable javascript and then refresh table C1

    Dynamic action is customized with a type DOMObject of the document and no condition

    It works fine, but when I add another combination of State/chart (report A2, table C2) with a similar dynamic action (D2), D2 is a copy of D1 with the values for the variables and chart area has changed.

    The A2/C2 feature works very well on its own, D2 is fired when I click on the link in the column, but not when there are 2 dynamic actions customized / document on the page.

    This column on A2 link triggers the dynamic action D2 if dynamic action D2 contains a higher than D1 sequence (if I move over D1 in the list, it will trigger, but then D1 will not fire for the link in the column on the A1)

    Am I missing something?

    Thank you

    Kathryn

    It turns out that dynamic action set to fire on the loading of the page made reference to a javascript variable not defined (page element is not filled yet at the time of the loading of the page), so everything after that is ignored and the second dynamic action does not occur.

    I turned off the fire on loading the page for dynamic and all actions work

  • tool in interactive reports not made custom jQuery overlay

    As the subject says, I had a problem in jQuery on an interactive report. He works on a pages unpaginated, like forms, as well as in interactive reports, but each time the data is paged, after that you go to the next page, jQuery does not work.


    Here's the scenario:

    I have an interactive reports page that shows the files in my table (all are images).

    SELECT
    ("< img src =" #OWNER #.) DISPLAY_IMAGE_PROC? image_id ='
    || f.image_id
    || "" width = "64" height = '48' rel = "#img" | " f.image_ID | ("" / > ") AS IMAGE
    FROM TABLE_NAME


    The attribute rel of the image is one I use to get the jQuery to work.
    The src of the image is a procedure to get the path of the image. (Based in the Dene Demo Application)


    On the interactive reports Page, it displays the image correctly.
    When you click the Image, it will display an image overlay with a size of 640 x 480.
    But when you go to the next page, the function will not work and there is no data errors (javascript / error oracle / any other).

    If you do not know how to implement a tool simple overlay in jQuery go here: http://jquerytools.org/demos/overlay/index.html

    everyone the experience of something like that?

    -Philip

    Published by: 942717 on June 25, 2012 14:44

    You must activate the overlay on after refreshing the report

    Create a dynamic action

    Event: after refresh

    Selection type: region > and select your IR region

    Action: run the JavaScript Code

    Code: add your code to overlay something like below

    $("img[rel]").overlay();
    
  • Call for dynamic action of an interactive report

    Hello
    I'm on APEX 4.1, 11 GR 2, Windows 7 and the latest version of Firefox.
    I have an interactive report. I want the end user to have the ability to click on a link to line level and launch a modal pop up on another page. Ideally, I would like to be able to use the Skillbuilders plug-in. I can make it work if I just go the road full page but I can't find a way to make it work like a modal pop up.
    I have tried different methods, which work, but I think that I should follow that is using a page-level dynamic action that fires when a found JQuery element selector is selected.
    The problem I have is that I can't find the proper JQuery selector syntax for the column. My report has a static ID of the IDN and my column a header of PARTS.
    The best I can manage is not to see something happen as a page refresh (if the link is on the same page). I don't see no errors in console and firebug.

    I replaced the dynamic action modal page appeal by an alert, which is not displayed, to make sure that it is not the configuration of the plug-in which is the cause of the problem.

    Someone would be kind to give me an idea of what I should be completed in the JQuery selector field of the DA and what should be the attributes of link? Because I want to redirect from page 1 to page 2, what should I put in the other fields in link?
    I've been chasing my tail with this for hours and read all the posts in this area, I could find, but I can't make it work. Any help would be much appreciated.
    Kind regards

    Danny

    That's what I did on my column link of an international registration:

    Link icon: (choose something)
    Link attributes: class = "btndetails" onclick = "return false;"

    (the onclick is vital, it prevents the default anchoring action does not happen)
    Implement the details of the target page that you want in your popup modal

    Create a dynamic action

    Event: click on
    Selection type: jQuery Selector
    jQuery Selector: .btndetails

    Advanced > scope of the event: live

    Real action:

    Modal Skillbuilders page:
    Location of the URL: attribute of the triggering element
    Attribute name: href

    Who should appear in the page without problem. The onclick is the key here, and probably why you were chasing your tail so far.

  • APEX 4: Dynamic Action to manipulate a search string in the interactive report

    Hello

    I have the following problem. I have an interactive report that shows a few columns and one of them has a barcode that has been saved as a numeric value for display in the column is something like ("123456789"). All works fine so far. If anyone 123456789 they will get the right line and all is well. Unfortunately if I scan in the barcode with a barcode scanner, he enters '01234567890'. I don't have nor the ability to reprogram the scanner BC and I can't change how the data gets displayed.

    So I thought I would create a dynamic action that is triggered when the contents of the textfield object change. So, I've created a dynamic action, selected jQuery and entered .apexir_SEARCH and the Change event.
    I then chose to run JavaScript and entered as cod:

    var newsearch = document.getElementById ('apexir_SEARCH').value.replace (/ ^ [0] + / g, ");
    var inputObj = document.getElementById ("apexir_SEARCH");
    If (inputObj)
    {
    Update of the value
    inputObj.value = newsearch;
    }

    So far so good. When I load the page and enter a value from a '0', it works like a charm and it removes the zero. But if I delete again on the page and the search filter, dynamic action will do nothing. I'm really confused, as if I just made a mistake in the JavaScript code or what is the reason, that the action runs only the first time. I have to reload the page and then it will still be to manipulate the string once, but the second time, it won't.

    I'm very happy for any help you can provide!

    Thank you
    Dennis

    Hi Dennis,

    The thing that comes to mind is to check that the scope of the event of dynamic action is 'live '. If it's on (default) bind, then when a partial page refresh occurs, action will not fire the first time. Direct fires each time.

    Hope this helps

  • Dynamic action with refreshment area interactive report

    Hello!

    I use APEX 4.02

    I have a page with 2 regions.
    Region1 is a form (of entry)
    Region.2 is an interactive report on the same table as region 1

    When you enter values in the form I'm trying dynmically similar research records in the table with the interactive report.

    I made a dynamic action on the change of form fields that must refresh the interactive report region. I can see this one fires if I add an alert to debug if it fires.
    The dynamic report is based on a query with bind variable pointing to the fields in the form, for example
    where
    Field1 =: P2_FIELD1


    It works fine on the page loading, so no action is triggered, but I see the lines in the region of report are the ones I'm looking for.
    The updating of the report area does not work, but it is never nice and/or showing the correct data after a change of form fields, if it looks like the dynamic action "refresh the region" does not work on the interactive report.

    Any ideas why it can go wrong?
    I want to solve this problem using standard dynamic actions and preferably not via PL/SQL or JS, should be possible if I believe documentation... ;)

    See you soon
    Bottom

    Published by: bklerk on 26-apr-2011 03:07

    Hello

    Check this example application
    http://Apex.Oracle.com/pls/OTN/f?p=39830:38

    You can download and check the source

    Kind regards
    Jari

  • Dynamic action - Hide and show interactive report

    Hello

    in the apex community tip http://www.oracle.com/global/de/community/tipps/apex40-dynamicactions/index.html (only in German), there is an example to hide and show a report interactive by dynamic actions.

    The approach described in the article should be case for normal or interactive reports.
    But in my case it works for normal relations. I am not able to update or hide the interacitve dynamic equity report.

    Has anyone had similar experience?

    Greetings
    Michael

    Hello
    You are welcome.

    * It is considered good etiquette to the responses of reward with points (as "useful" - 5 pts - or 'correct' - 10pts). :)
    Thank you
    Logaa

  • Dynamic action function Interactive report select value list

    I want to perform an Action when a user selects one of the 3 options in a selection list in an interactive report:

    Select APEX_ITEM. SELECT_LIST)
    p_idx = > 3,
    -p_value = > deptno,.
    p_list_values = > ' copy; Copy, delete, delete, export to PDF format. Export to PDF ',
    -p_attributes = > "style =" color: red; ' " ',
    p_show_null = > 'YES ', he said.
    p_null_value = > NULL,
    p_null_text = > "- Select -",
    -p_item_id = > ' f03_ #ROWNUM #'.
    p_item_id = > 'P6_IR_SELECT_LIST ',.
    p_item_label = > ' label for ROWNUM f03_, #
    p_show_extra = > 'YES') "Actions".
    Double;

    When you generate the dynamic Action, I chose the following values of the Advanced Wizard
    Event: select
    Selection type: DOM object
    DOM object: P6_IR_SELECT_LIST
    Condition: Equal to
    Value: 'delete '.

    Action: Run the Code JavaScript: Alert ('Here');

    Does not seem to be shooting... can anyone help?

    Thanks in advance,
    John

    The problem is the type of event.

    'Select' fires when text is selected in a text field, not when an option is selected in a list...

    Try instead "change."

  • Apex 4.0 interactive report row view dynamic action "after Refresh.

    Hello

    It seems that interactive report view row do not trigger the event "after refresh.
    I have not tested other events.

    I have taste.
    https://Apex.Oracle.com/pls/OTN/f?p=40323:76

    There is a dynamic action that show the alert by region "after updating' event.

    When you see a row, the alert is not displayed.
    Change record show no alert ether.

    Is it bug or missing feature?

    Kind regards
    Jari

    Hi Jari,

    I consider this a bug/feature missing as well. I filed bug # 10376989.

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Hide filter interactive report dynamically after the page load

    Hello

    I try to hide the section of interactive report filters (hide/show the area with +/-sign on the top of the report) the loading of the page

    I have the reference to the thread after http://apex-at-work.blogspot.com/2011/02/hide-interactive-report-filter.html posted by Tobias Arnhold...

    According to the expert, all I have to do is post the following code the code JS "page loading" within a dynamic action...


    / * Hide filter IRR after page load * /.
    If ($('#apexir_CONTROLS_IMAGE').attr ("src") == ' / i/minus.gif ') {}
    gReport.toggle_controls ($x ('apexir_CONTROL_PANEL_CONTROL'));
    }

    I did, but apparently it does not work for me...

    I posted a sample on APEX. Oracle.com for review and comment

    Thank you

    Edited by: qwe12654 may 3, 2011 19:15

    Hello

    01. in the report Footer region put this

    
    

    * This will hide your filters, highlight conditions

    02. then Goto 'Report attributes' => 'Search Bar' => for 'Include search bar' select 'no '.
    * This will hide the full search bar (do this only if you want to hide this part)

    * If you get the answer then mark as 'Correct '.

  • Dynamic interactive report

    Hello

    I have a requirement to create the financial report of pivot using interactive report. I managed to create a function retutning the dynamic query for the report of pivot as follows:

    CREATE OR REPLACE FUNCTION
    fnc_pivot
    RETURN VARCHAR2 AS
    CURSOR cur_qry IS
    SELECT DISTINCT', SUM (CASE WHEN financial_year = "')
    || financial_year
    || "' ' AS case_st
    (' THEN annual_allocation END) AS
    ||'"'
    || financial_year
    ||'"' AS case_head
    OF finance_table
    ORDER BY case_head;

    l_query VARCHAR2 (32000) DEFAULT NULL;
    BEGIN
    BECAUSE me IN cur_qry
    LOOP
    l_query: = l_query
    || i.case_st
    || i.case_head
    || CHR (10);
    END LOOP;
    l_query: = 'SELECT id.
    || l_query
    |', ' SUM (annual_allocation) AS
    ||'"'
    ||' Total general '
    ||'"'
    ||' OF finance_table '
    ||' GROUP BY id';

    Return (l_query);

    END;

    Which returns the following query:

    SELECT fin._id, SUM (CASE WHEN fin.financial_year = ' 2007/8 ' THEN fin.annual_allocation END) AS "2007/8.
    , SUM (CASE WHEN fin.financial_year = ' 2008/9 ' THEN fin.annual_allocation END) AS '2008/9 '.
    , SUM (CASE WHEN fin.financial_year = ' 2009/10 ' THEN fin.annual_allocation END) AS '2009/10 '.
    , SUM ("CASE WHEN fin.financial_year = ' 2010/11" THEN fin.annual_allocation END) AS "2010/11"
    , SUM (CASE WHEN fin.financial_year = ' 2011/12 ' THEN fin.annual_allocation END) AS '2011/12.
    , SUM (CASE WHEN fin.financial_year = ' years future "THEN fin.annual_allocation END) AS"Future Years ".
    SUM (annual_allocation)
    OF end financial_table
    GROUP BY fin.id

    And these are the results




    Total general 2011 2010 2009 2008 2007 ID/8/9/10/11/12 years to come
    0 121 541 2545 1454 5454 3545454 CHWP01L201
    80000 654534 45654 4545 545 54545 212545 CREP01L201



    So if I create a normal SQL statement (function of PL/SQL returning query) it works beautifully, but as we cannot make the same Interactive report I created an apex_collection based on the above function.

    Here's my problem, because the columns are dynamic can't go and create a report based on ' Select * from apex_collection ' that returns all the 50 columnswhether apex_collection they gave or not. And even if I do "Select c001, c002 c003... Of apex_collection 'headers are' c001, c002... rather than the exercises I need.

    Has anyone had a similar problem? Is there a solution to this problem or should I just wait and hope that the next version of Apex has this feature (and no, Oracle buddies, no sarcasm here, only resignation after day of head breaking with no solution).

    Any help will be much appreciated.

    Best regards
    Sophie

    Hi Sophia,

    Take a look on: [http://apex.oracle.com/pls/otn/f?p=27169:4]

    This is a report from pivot for standard and interactive reports and explains how to create report data and generate results.

    As you have seen, the complicated bit is the headers and masking the unused columns. For the version of the IR, the titles are stored in the hidden page items and the column headings are defined as & P5_HEADING1, & P5_HEADING2. etc. The columns are hidden by checking another hidden element which holds a number of columns.

    You may not use directly for your own needs for IR, but if all goes well, it should give you an idea of what you could do.

    Andy

  • Customize the Action menu in the interactive report

    To change the word 'Action' in the menu of the interactive report.

    Apex 4, we had the 'Image of the Action menu' option, but the Apex 5 this option disappeared.

    This isn't in known issues in the Apex 5!

    Someone knows how to set an image or other text to the menu Action interactive report?

    Anderson.Ferreira wrote:

    To change the word 'Action' in the menu of the interactive report.

    Apex 4, we had the 'Image of the Action menu' option, but the Apex 5 this option disappeared.

    This isn't in known issues in the Apex 5!

    Someone knows how to set an image or other text to the menu Action interactive report?

    Why do you need to change?

    Follow the instructions in 'Translating Messages used internally by Oracle Application Express' to create a custom text for the message of the APEXIR_ACTIONS system. Available for translation/customization internal messages are listed in these tables.

  • Rename the download interactive report action

    I'm 5 APEX site apex.oracle.com

    ....

    I need to rename

    action > > download to export files > > file types

    in the interactive report

    as we in the image below

    Hello

    Those who are transltable of the APEXIR_ACTIONS and APEXIR_DOWNLOAD messages

    https://docs.Oracle.com/CD/E59726_01/doc.50/e39147/global_messages.htm#BABEGGHA

    Add those to your SMS application and specify the text that you need

    Kind regards
    Jari

  • Variable setting wrong with dynamic action for the region of report

    Hello

    I can't setting a variable. Here are the details of connection:

    Connection information:

    TCARMY workspace

    User Apex_dev

    Password dev_apex

    Application 88542

    Page 11

    If you run the page 11 and just click on submit, there will be two rows. If you click on one, the modal region won't say no data found. If you click on the button submit once again, the value is passed if you click on it now, the results arrive. If you click on the second row, it still shows the value of the first row. If you click on submit again after clicking on the second line, then it is displayed correctly. It seems that the value is set to submit it. I want this to work when clicked, and then for the sql to run with the value that is in this variable when clicks on the element. There is a bit of javascript page level and dynamic action. Something is not right to the installation.

    The modal window should popup and run the sql at that time with the variable data and view the two columns. And if the user clicks on the second row, it would display the data in the row.


    Thank you

    Tim

    TC-army wrote:

    If you run the page 11 and just click on submit, there will be two rows. If you click on one, the modal region won't say no data found. If you click on the button submit once again, the value is passed if you click on it now, the results arrive. If you click on the second row, it still shows the value of the first row. If you click on submit again after clicking on the second line, then it is displayed correctly. It seems that the value is set to submit it. I want this to work when clicked, and then for the sql to run with the value that is in this variable when clicks on the element. There is a bit of javascript page level and dynamic action. Something is not right to the installation.

    What has not been set up right, it's that the element of P11_NAICNUMD parameter was not specified in the source attribute of Page to go to the region, modal Discount. The current value in the browser page, therefore, was not defined in session state when the report has been updated by the dynamic action. When

Maybe you are looking for