Dynamic Actions in Oracle APEX

Hello all,
I am using Oracle APEX 4.0.
In an application, on a page I am using two standard dynamic actions
to show particular items to the user.
The first one is working fine but when I select the item which
triggers second dynamic action the result of first one is
reverted.
I tried all the three event scopes bind, live and once.
But it didn't worked out. Please suggest something?

Your question is very vague, you ll have to provide more details about what each of those dynamic actions does.

Similar Messages

  • Dynamic actions in apex 5.0

    I have upgraded an application to apex 5.0 and have a few bugs related to dynamic actions.
    It seems that even when the "page items to submit" field has been filled in the session state/item value is not updated and consequently can not be used in the dyamic action.  (its possible I had set this manually via js in the html attributes but if so then this was lost due to conversion..possible but it seems less likely.)
    Has anyone had a similar experience or know of a way to fix this?

    Hi,
    as already pointed out the above code isn't really a JavaScript Expression, because it doesn't return anything. APEX 4.2 and previous versions where more forgiving, because they used eval to execute that dynamic JavaScript code. Eval is very forgiving and also accepts code which doesn't return anything. Because of security best practices, APEX 5.0 isn't making use of eval anymore and expects that the JavaScript expression is really an expression and not a JavaScript code block. Please see the documented change of behavior '4.24 Dynamic Action Set Value Action Set Type JavaScript Expression More Strict' in our Release Notes at https://docs.oracle.com/cd/E59726_01/doc.50/e39143/toc.htm#HTMRN310
    In my opinion the above dynamic action should actually be of type 'Execute JavaScript Code' instead of 'Set Value'. Because that's what it's actually doing.
    You can run the following SQL Statement in SQL Commands to get an idea which dynamic actions might be affected by this change of behavior. It searches for multi line JavaScript Expressions.
    select page_id,
           page_name,
           dynamic_action_name,
           action_name,
           attribute_05
      from apex_application_page_da_acts
    where application_id = 96695
       and action_code  = 'NATIVE_SET_VALUE'
       and attribute_01 = 'JAVASCRIPT_EXPRESSION'
       and instr( attribute_05, chr(10) ) > 0
    order by page_id, dynamic_action_name;
    Sorry for the inconvenience this security change has caused for you.
    Regards
    Patrick
    Member of the APEX development team
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • How to abort tasks in a Dynamic Action when apex.confirm = Cancel

    I have a text field that has a Dynamic Action attached to it. When the field is changed, the Dynamic Action fires. There are 6 separate tasks in that Dynamic Action.
    The very first task is a call to apex.confirm. I want to make sure that the user understand the implications of changing the value in this field. So, up pops the dialog, the user reads the information, and decides to click OK or Cancel.
    If OK is clicked, I want to continue through the rest of the tasks in the Dynamic Action. If CANCEL is clicked, I want to just abort out of the Dynamic Action.
    Is that possible?
    Apex 4.1.1.00.23
    Edited by: Mark T. on Mar 1, 2012 9:49 AM

    Yes, I do see a different behavior.
    I've set up an app on apex.oracle.com, #60312. Workspace is mavericksolutions. Login pwolf. Password A1B2C3 change on first login.
    The first field is tied to a dynamic action. The first task in the DA is an apex.confirm. Type something into the first field then click TAB to bring up the dialog box. Whether I click OK or click CANCEL, the 2nd task is still occurring. It appears that the only difference is that if I click OK, I also get a submit of the page.
    What I want, in fact, is twofold:
    1. If I click CANCEL, then STOP the execution of the remainder of the tasks in the Dynamic Action.
    2. If I click OK, go ahead and process the rest of the tasks in the Dynamic Action, but DO NOT SUBMIT.
    Basically, I want to ask the user if it's OK to go ahead and make the on-screen changes, but I do NOT want to do an auto-save. I want the user to look at the results on the screen and click the actual SAVE (or CREATE) button after ensuring their accuracy. Right now, it appears that the apex.confirm is firing a page submit when I click OK (the fields get cleared out). I don't want that page submit.
    I THINK I can accomplish goal #1 with a workaround, by splitting the DA into two pieces. Piece #1 would have only the confirmation dialog. Piece #2 would be fired from the same field change, would have a sequence number AFTER piece #1, and would be conditional on the value of the expression returned by the apex.confirm. So if the apex.confirm returned 'DOTHIS' when I click OK, I would look to see if Expression = DOTHIS for piece #2. If not, then piece #2 wouldn't fire.
    The remaining trouble, then, is that if I click OK to fire piece #2, the page submit will subsequently fire following the completion of piece #2. And no matter what, I definitely do NOT want a page submit. Is there a function similar to apex.confirm that does not do a page submit?
    Anyway, take a look at the app. It's not performing the way that I anticipated, which is the same behavior that you described. I expected that it would do exactly what you said. Alas...

  • APEX 4.0.1: restriction on maximum number of dynamic actions on a page?

    Hello,
    I would like to know if there is a restriction on the number of dynamic actions on a page.
    I have a page with 29 dynamic actions. All works fine on the page.
    If I create another dynamic action that only display an alert or does anything else, I have the error message HTTP 404 when I try do display the page.
    If I delete an old dynamic action and create a new one then the page works fine.
    So after several tests, it seems that there is a maximum number of DA on a page but can someone confirm that?
    Environment:
    APEX 4.0.1
    Embedded PL/SQL Gateway
    Regards,
    Sddc

    I stand corrected in that some limits are acknowledged:
    http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/limits.htm
    Where are people getting these ideas that normal form or "Codd" said that there was a
    limit on columns and if you had more columns than a database product found convenient to implement that it was a 'design defect'? I took database management as an undergrad and in grad school and there was NO rule about number of columns. Anyone who says there is is shoveling pure bs. Even if there were such a rule, and there isn't, it is very inadvisable for a vendor who allows 1000 columns in a table in their database product to impose a limit that is 1/10 of that in an interface to their database. (And btw you can create a table (A 'wide' table, in sqlserver with 30,000 columns according to this:
    http://msdn.microsoft.com/en-us/library/ms143432.aspx )
    Artificially dividing up data instruments that were administered/collected at one time into pieces in separate tables, just to make a vendor's developers' life easier and more convenient, or just to keep the product from competing with the extremely extremely expensive "enterprise" products the vendor sells, is not acceptable.
    Splitting highly related data into separate tables for no reason other than the
    interface is not capable of handling it, creates a load of problems that would not otherwise
    exist. What if the user enters less than all the parts? Then someone has to figure out if the parts not entered had no data recorded in the source or if they were simply accidentally skipped. Basically someone or a program would have to enter those pages and denote they had no content if that were the case. Much more logic, much more opportunity for error vs keeping data that was highly associated together.
    A software vendor can apply whatever limits they want and no one can stop them, that's for sure. But what would be better here is making these more clear up front. This is a "rad" development tool for very small and not hugely complex forms and reports. Be clear and there will not be people royally steamed over spending their time and money evaluating a product that is not designed to do much of what people need it to do. This stuff should be in an FAQ and the top of the forum.

  • 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

  • Dynamic Action in APEX 4.2

    Hi,
    I try to use dynamic action but I cannot find the right event.
    The following:
    If the current -- v(APP_USER) - user is in group Administrator then the Items Name, Userid, Password, Group shold be editable else only the Password should be editable.
    In P0_GROUP there is the group of the current user.
    The page to show the Items is P6_NAME, P6_USERID ...
    I cannot find an action to start for example a PL/SQL funktion which return true or false. And what event is correct (page load?)
    Please help me.
    Regards
    Siegwin

    siegwin.port wrote:
    Hi,
    I try to use dynamic action but I cannot find the right event.
    The following:
    If the current -- v(APP_USER) - user is in group Administrator then the Items Name, Userid, Password, Group shold be editable else only the Password should be editable.
    In P0_GROUP there is the group of the current user.
    The page to show the Items is P6_NAME, P6_USERID ...
    I cannot find an action to start for example a PL/SQL funktion which return true or false. And what event is correct (page load?)
    Please help me.
    Regards
    SiegwinFirstly why are you using a dynamic action to achieve this?
    You should use read only attribute on those page items, See http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/bldapp_item.htm#HTMDB28297
    Vikram

  • Calling APEX form with dynamic parameters from Oracle Apps 11.5.8

    I have successfully managed to setup access to APEX forms from Oracle Apps 11.5.8 menus utilising Form Functions passing a number of hardcoded parameter values as outlined in the document, http://www.oracle.com/technology/products/database/application_express/pdf/Extend_Oracle_Applications_11i.pdf.
    I am now trying to ZOOM from an Oracle Form passing values of form items (dynamic parameters) to an APEX form. I have so far not been able to do this.
    I've also tried using;
    web.show_document('http://derep.obup.co.uk:4657/pls/apex/f?p=100:1::::::p1_cust_account_id:'||name_in('ast_cu_act.account_id')||':', '_TOP');
    but this prompts for a username/password again as this bypasses the APEX Launch process that is defined in my Form Function.
    Is this possible in the parameters section of Form Functions? or elsewhere.
    Regards,
    Naeem

    Hi Daan
    We do havea couple of customers doing this, they have taken two approaches:
    1. Install XMLP on a separate server entirely - kick off conc request to extract data and then use Java Messaging Service (JMS) to push the resulting XML to the external server where they are using AQ to set up jobs for the XMLP server to work through, generating and delivering the final documents.
    2. Set XMLP up as a virtual printer - here the conc request again generates XML but this time the result is directed to a virtual printer namely XMLP. There is a perl or similar wrapper that gets called as the printer and accepts the data, template, output format and delivery destination as parameters.
    Apologies for the 10,000 feet overview, hope it helps. Tim

  • Can we get multiple graphs dynamically in oracle apex?

    Can we get multiple graphs dynamically in a page in oracle apex?

    Vaishalini wrote:
    Thank You riedelme and Howard.
    Below is the example, I need to dynamically displays graphs with content (somewhat) dynamically selected for client from the select list.
    Example :-
    Lets say client A contains 5 contracts as A1, A2, A3, A4, A5.
    And Client B contains 3 contracts as B1 ,B2, B3.
    created a graph for contracts on sum(unique_submissions) and sum(total_submissions).
    Requirement is :-
    When I select Client A , then the page should show 5 individual graphs based on client A contracts in same page(as client A has 5 contracts).
    Similarly when select client B , the same page should show 3 graphs (as client B has 3 contracts).
    Please let me know if you understood the example, what I was trying to explain to you (I hope)and let me know if you need further more information.
    Thanks.It sounds like you need to use Howard's idea of conditional region display. When you select client A display client A graphs, and when you select client B display those graphs. Read about conditional region display in the documentation and post back here if you have more questions

  • APEX 3.2 -  Dynamic Actions

    Hi,
    I know that we can apply dynamic actions in apex 4... can we do something similar in 3.2... if not, what's the alternative...?
    Thanks

    Hi,
    Dynamic actions are introduced on Apex 4 and there is not anything similar on Apex 3.2.
    But you can write your own JavaScripts. See e.g. this
    Apex 3.2 hook javascripts to IR and execute those when report is refreshed
    Regards,
    Jari

  • Apex 4.2 dynamic action to refresh a report region on a different page

    Hi,
    I open up a pop up window from a report region. When the user is done in the pop-up window and closes it, can I trigger a refresh on the report region using dynamic actions without actually reloading the whole page? I know I can use dynamic action on a page to refresh the report region on the same page.
    Thanks,
    Sinan

    Sinan,
    So long as the region to be refreshed is still loaded, you can do this. I don't know how you are loading your pop-up or unloading it but, the principle should be the same as what I provide below.
    Assume that you have set the static ID for your report to MY_REPORT. (Be sure you have checked "Allow Partial Page Refresh" in the Report Attributes).
    $('#confirmBox').find('div#userConfirmationMessage').html( '<span class="userInputRequest">Would you to Refresh your Report?</span>' );
    $('#confirmBox').dialog(
        autoOpen: true,
        modal: true,
        title: 'Refresh Conformation',
        buttons:
            'No': function ()
                $(this).dialog('close');
            'Yes': function ()
                $(this).dialog('close');
                 $('#MY_REPORT').trigger('apexrefresh');
    -Joe

  • Dynamic Action on apex items

    Hi,
    I have a requirement like after entering the date of birth in the item. then age value should be set dynamically.
    how can i set the value?

    Hi Tulasi,
    Follow the below steps
    Click on create button-Dynamic action
    select Advanced type
    Give some name
    event - On change
    selection type - item
    item(s) - your page item(used to select date of birth)
    condition - no condition
    action - Execute PL/SQL code
    Fire on page load - blank
    PL/SQL code -
    declare
    v_age varchar2(100);
    v_dob date;
    v_sysdate date;
    begin
    select sysdate into v_sysdate from dual;
    v_dob := :P1_DOB;    //here P1_dob is a page item from where i am selecting date of birth.
    select trunc(to_char((v_sysdate - v_dob)/365)) into v_age from dual;
    :P1_AGE := v_age;     // i have created one item named P1_AGE to display the calculated age.
    end;Page Items to Submit = P1_DOB // replace with your datepicker page item
    Page Items to Return = P1_AGE // replace with your item.
    Hope this will give you some idea.
    Thanks and Regards,
    Jitendra

  • Dynamic Action on item not working in APEX 4.2.1

    Created Dynamic action on item(Radio based on LOV) to show/ hide other items (event is Change). But its not working. I mean nothing happening onchange ..

    Based on the Radio item value "a" (Y/N) i am showing or hiding items b and c. All these items are in same region.
    Output seen : By default all the items are displayed and no action on changing the value of the radio item a.

  • Dynamic Action in Apex - Select list to Text field

    Hi,
    I have two text items. Need to create dynamic action for the following,
    1. Order_type - Drop down values having CONSUMER & WHOLESALE.
    2. Order_number - Text field
    When a user selects CONSUMER, order number should automatically change to '1-' and user can enter only 14 characters (1-236666666666).
    When a user selects WHOLESALE, order number should automatically change to '2-' and user can enter only 12 characters (2-2155555555).
    Can someone please help to resolve this issue.
    Thanks in advance.

    Hi Gayathri,
    Gayathri Venugopal wrote:
    Thanks Kiran. Actually ,order number should be disabled. only on selection of  order type, order number should be enabled, how do I do that?can you please help
    I can do fire on page load and disable order number .But how do i enable it again on selection of order number
        Let's say '1-' is prefix for Order Number when Order Type is 'CONSUMER' and '2-' is the prefix for Order Number when Order Type is 'WHOLESALE'.
        So a solution to your issue would be:
    Go to Page Attributes -> CSS -> Inline CSS and add the following class:
    .item_disabled {
      cursor: default;
      opacity: 0.5;
      filter: alpha(opacity=50);
      pointer-events: none;
    Create three elements PXX_ORDERNUM_PRE, PXX_ORDERNUM_SUF(as text Items) and PXX_ORDER_NUMBER(as hidden. Set Value Protected -> No).
    Arrange the PXX_ORDERNUM_PRE and PXX_ORDERNUM_SUF on one row.
    Set the "HTML Form Element Attributes" for PXX_ORDERNUM_PRE to this:
    readonly="true"
    Set the "HTML Form Element CSS Classes" for PXX_ORDERNUM_PRE to this:
    item_disabled
        NOTE : The above two points are to make the PXX_ORDERNUM_PRE element readonly, because if we disable the element we can't assign it a value.
    On the change event of PXX_ORDER_TYPE select list create dynamic action to populate PXX_ORDERNUM_PRE (as mentioned earlier)
    var ordertype = $('#P11_ORDER_TYPE').val();
    if (ordertype === 'CONSUMER') {
      $('#P11_ORDER_NUMBER_PRE').val('1-');
    } else if (ordertype === 'WHOLESALE') {
      $('#P11_ORDER_NUMBER_PRE').val('2-');
    Create an on-submit computation to concatenate PXX_ORDERNUM_PRE and PXX_ORDERNUM_SUF into PXX_ORDER_NUMBER.
    Create validation on PXX_ORDERNUM_SUF, if PXX_ORDER_TYPE is 'CONSUMER' the length should be 12 characters, if 'WHOLESALE' the length should be 10 characters.(excluding 2 characters of prefix).
         So this covers the following:
    On change of Order Type, Order Number Prefix should be set.
    Order Number Prefix should be not able to be modified, but the rest of Order Number should be able to be entered by user.
    Order Number should be of specific length depending upon the Order Type.
         Hope this helps!
    Regards,
    Kiran

  • APEX Dynamic Actions?

    Hello i'm trying to figure how how to have a dynamic action populate text fields.
    When the create button is hit, it will insert the record in the DB like normal.
    I had a search box doing a dynamic action when a record_number is entered and the selection changes
    It populates the remaining text boxes with the results of the record_number.
    I used a "SET_VALUE" true action on each individual ITEM
    For each individual item i have different SQL Statement populating that item.
    Ex. To populate Last_Name/ P2_LAST_NAME item i do the following
    Select LAST_NAME from patient_Demographics
    where record_id = :P2_RECORD_ID
    Affected Elements:
    P2_LAST_NAME
    So i have about 8 of these true statements, so i'm hitting the DB 8 times to get the individual items.
    Is there a way to hit the DB once and set the items using one PL/SQL statement?
    I tried using a PL/sql function body, i'll admit, it didnt know what i was doing, it didnt work

    Hi,
    So as you've found out, support for setting multiple affected elements in 4.0 is very limited. Are you definitely trying this out on 4.0? The reason I ask, is because we only introduced the 'Page Items to Return' attribute in 4.1.
    In 4.0, I would suggest falling back to a combination of a dynamic action, some JavaScript and a page level AJAX callback, as described here:
    Dynamic Action - setting the the value of multiple Affected Elements
    I think this should work better for you than trying to manipulate the 'Execute PL/SQL Code' action in 4.0 to do this.
    Hope that helps.
    Anthony.

  • APEX dynamic action - How to hide an item after the page loads

    Hello
    I have a form  with  item  Type,  lesson and page.   I want to create a  dynamic action like "on page load" if Type = x then don't show lesson and page items. .
    How do I say if Type=x then  don't show lesson and page. otherwise show them.
    Please note Dynamic action,  Event=Page load
    Thanks

    create dynamic action like
    Event:Change
    Selection Type:Item
    Item:Type
    Condition:Equal To
    value:X
    Select Action:Hide
    Select Items to hide
    also create opposite false action
    and click on page checkbox below action to yes
    Hope this may helps
    pars.

Maybe you are looking for

  • How to transfer an xml file to NW Portal Knowledge Management from XI?

    Hi all, Anybody knows how to transfer an xml file to NW Portal Knowledge Management from XI? What kind of adapter type I have to choose? And which procedures I have to do in KM Portal? Create a folder, what kind of folder and permissions? Suggestions

  • Arabic titles in itunes

    when importing songs containing arabic titles or tags all letters appear in a unreadable and offcourse when syncronizing with iphone or ipod same rubbish appears in the ipod can anyone tell me what do do to resolve this issue please?

  • Question about weblogic-cmp-rdbms-jar.xml

    WinNT 4.0 SP6, Weblogic 5.10 In the online documents, it says: ---- digest from the online documents ---- The following example finds all the EJBs in a table. It uses the sample finder method signature: public Enumeration findAllAccounts() throws Fin

  • Direct PDFExport is not listed as accept conversion in IBR

    hi Experts, I am using wcc11.1.1.7, I have an issue on Direct PDFExport as the following: 1.I configured outgoing provider from UCM server, enabled inboundrefinerysupport from UCM server, enabled PDFexportconverter from IRB server. 2. After restart U

  • Variable E is undefined

    Posted for one of our programmers:  Variable E is undefined ...but the error message only occurs on PROD servers, not DEV nor TEST.  Any ideas? Variable E is undefined. coldfusion.runtime.UndefinedVariableException: Variable E is undefined. at coldfu