Page cancel submission using Javascript not dynamic Action

I build features requiring little Javascript to validate the page before being submitted and prevent sending if there are errors in treatment.  I got this job with the help of dynamic action that fires before Page submit to a condition of firing of Javascript and an action to cancel the event, and it works fine.  However, the intention is to use this feature in several pages and it would be nicer if the functionality could be implemented in Javascript (for example, the code in the page template).

According to https://api.jquery.com/submit/ this should be possible:

$( "#wwvFlowForm" ).submit(function( event ) {

  alert( "Handler for .submit() called." );

  event.preventDefault();

});

However, I can't make it work in the APEX.  Can anyone suggest a solution?

during the presentation of the page using apex.submit () (which is probably all cases?), you can use submit it before event like this:

$(document).on("apexbeforepagesubmit", function(){ alert("before submit"); apex.event.gCancelFlag = true; });

You can find this by looking at the source code:

page.js

// Trigger a 'Before Page Submit' event for the document, and pass the current request value for convenience.
lCancelSubmit = event.trigger( apex.gPageContext$, "apexbeforepagesubmit", lOptions.request );
// Cancel submission, if the apex.event.trigger function says so (with a true return value).
if ( !lCancelSubmit ) {

Event.js

event.trigger = function( pSelector, pEvent, pData ) {

      // Default to false, event cancelling should only be done if an event handler says so
      // (by setting this flag to true).
      event.gCancelFlag = false;

      // Trigger event
      $( pSelector, apex.gPageContext$ ).trigger( pEvent, pData );

      // Return the value of gCancelFlag
      return event.gCancelFlag;
  };
})( apex.event, apex.jQuery);

Also found in dynamic_actions.js

/**
 * cancelEvent function
 * Cancels event processing...
 * */
da.cancelEvent = function() {

    /* Set cancel flag in the apex.event namespace to true. This value can be used to cancel subsequent
       processing, such as in page submission to stop the page from being submitted. */
    apex.event.gCancelFlag = true;

    /* Set cancel actions flag in apex.event namespace to true. This value is used in dynamic
       actions processing to stop further actions firing. */
    da.gCancelActions = true;

    /* Call the event method stopImmediatePropagation. This prevents any event handlers
       bound to the current event from executing. It also calls stopPropagation to stop the
       event from bubbling up the DOM (if it supports bubbling), so any event handlers bound
       to ancestral DOM elements will not fire either. */
    this.browserEvent.stopImmediatePropagation();

    /* Call the event method preventDefault. This prevents the default behaviour of the
       event (for example prevents going to the URL of a link, if a link is clicked). */
    this.browserEvent.preventDefault();
}; // cancelEvent

It could change, but it would be weird. It works, but it is not really written in other than the one in the code documentation.

Notice also that the event 'submit' is pulled (it would be strange if she didn't)

//Submit the current form, defaults to "wwv_flow" if not provided in option map
$( "form[name=" + lOptions.form + "]", apex.gPageContext$ ).trigger( "submit" );

Thus, binding to 'submit' will work, and work, but note that Event.preventDefault () may NOT work depending on the browser used. For me it works in FF, does not check the others. You can try to use "return false;" instead.

Tags: Database

Similar Questions

  • I want to export a report to several pages to CSV using javascript code... Please suggest

    I want to export a report to several pages to CSV using javascript code... Please suggest

    Hi SubhajitChakraborty,

    If you are using Internet explorer as web browser, then confirm your request in Internet Explorer development Forums.

    http://social.msdn.Microsoft.com/forums/en-us/iewebdevelopment/threads

    If you use a Web browser to explore, then look for JavaScript communities to help.

  • Validation on the page point is lost when creating dynamic action button


    Nice day

    I have some page elements like empno, job etc in my application to learn the goal where I validations

    to check the length of the point/numeric field and check for null

    I have 4 buttons [create, delete, cancel, apply changes] do dml basic operation

    Initially, all validations were shot when there was not any trigger attached to the buttons

    Once a dynamic action was created for a button by button create account to make these features as the insertion in arrays that are passed as a packaged procedure

    It works in all cases (for example) even if an entry is garbage does is allow inserts into the table and all the controls as EMPNO, JOBNO validations are ignored

    How can we ensure that these validations must be taken into account first and fired before and only if it is a valid entry before you create key

    otherwise it should always display error message when you enter invalid

    Tried to use the point of application by the shared components, then set value of Validation for function returns the error text a different value for the same point of the application

    [Like global variable]

    Don't know if the method described above is correct but stuck in this

    Not too much competent in JavaScript and didn't want to try if there is any possibility

    Kindly help on this

    Thank you

    Why not use page instead of dynamic action processes, they fire after validations

    Gus

  • Javascript-based dynamic action and display the value of (!) from the selection list

    Hello

    I'm not a jQuery guru (yet).
    Can someone show me how to turn on or off an ITEM on a form based on the value display of a selection list (usually I have dynamic lists, so I don't 'know' even internal values)

    I created a simple demo in which you can (if you want to) show me how it works.

    Workspace: 6POOLRULES
    User: demo01
    Password: demo
    Application: 30851 (Drone)

    The idea is to
    * Disable/hide the "Id other Description" If the ' Id Type (display value!) is 'Passport' or 'license '.
    * activate/display the Description of the 'other' Id if the ' Id Type (display value!) is "other".


    I think that it should be dynamic action based on javascript/jQuery. But what would this jQuery selector should look like?

    Published by: bveoracle on March 29, 2012 07:28

    Published by: bveoracle on March 29, 2012 07:30

    Hello

    OK, I changed the dynamic action to use Jquery and get text from the value. The only thing I changed is in the section WHEN.

    Enjoy.

  • APEX: Dynamic Action with tabular column

    I'm trying to 'turn off' couple of tabular columns using Javascript and dynamic Action.

    Some fields are text, although some are LOVs type

    I have no boy of Java, so a lot of my scripts are copied and modified based on examples I see, Plse forgive me.

    If the field is a text type

    With the help of Dynamic Type of Action such as disable, use the JScript

    $('_input[name="f20"]').attr ('disable', true);

    I managed to get the disabled column...

    But I don't seem to be able to apply to the Type "select list".

    Please notify

    Hi JAS-Oracle,

    But I don't seem to be able to apply to the Type "select list".

    Step 1:

    Go to report attributes-> edit your selection list column

    under column attributes - > add class attributes of the element, i.e.

    Attributes of the element: class = "select_list.

    Step 2: Create a dynamic Action

    Event: Page load

    Action: disable

    Selection type: Jquery selector

    JQuery Selector: //dont .select_list forget to put the point before the name of the class

    Hope this helps you,

    Kind regards

    Jitendra

  • With the help of JavaScript condition in the dynamic action of JQuery selector

    Hi guys,.

    I have a Setup master detail on a page.

    The detail section, I have a tabular presentation.  One of the fields is a selection list.  The first record in the select contains the value * not * that has a value of primary key for the 1.  I have a distinct region with a simple text field where the user can insert a value into the table if the value does not exist.

    I want than the region of text element to only appear if the value * not listed * is selected.

    I managed to make it work when the value is selected with the help of dynamic action with a bit of JQuery and JavaScript by setting the ID on the selection list to 'create' and have the following in JavaScript $(this.triggeringElement) .val ()! = 1 in the JavaScript for dynamic action condition shows it or hides the region of 'create' and that works well.

    However, if the secondary table is empty before the detail records were created (nothing selected in triggering jQuery Selector) the region of create is displayed when I don't want it.

    I guess I need some sort of NVL in JavaScript condition?

    I use APEX v4.2.

    Any advice would be appreciated.

    Chris

    Cashy wrote:

    I have a Setup master detail on a page.

    The detail section, I have a tabular presentation.  One of the fields is a selection list.  The first record in the select contains the value * not * that has a value of primary key for the 1.  I have a distinct region with a simple text field where the user can insert a value into the table if the value does not exist.

    I want than the region of text element to only appear if the value * not listed * is selected.

    I managed to make it work when the value is selected with the help of dynamic action with a bit of JQuery and JavaScript by setting the ID on the selection list to 'create' and have the following in JavaScript $(this.triggeringElement) .val ()! = 1 in the JavaScript for dynamic action condition shows it or hides the region of 'create' and that works well.

    However, if the secondary table is empty before the detail records were created (nothing selected in triggering jQuery Selector) the region of create is displayed when I don't want it.

    I guess I need some sort of NVL in JavaScript condition?

    I use APEX v4.2.

    Simple solution is to hide the region containing the element of text by default, using the style = "" view: no ' in the property of the attributes of the area in the region. " It will be always hidden when the page initially, but its visibility will be controlled by the DA subsequently.

  • Pop - up using javascript in dynamics of the Actions

    Hi all

    Before you begin with the question, I want to share the below of the details on the application

    Table creation script

    create table status_dashboard (ID number, name varchar2 (10), varchar2 (10) State, varchar2 (1000)) URL;

    Insert the script

    insert into status_dashboard values 1, 'A1', 'up', 'www.ibm.com';

    insert into status_dashboard values 1, 'B1', 'up', 'www.hp.com';

    "insert into status_dashboard values 1, 'C1', 'up', ' www.msn.com";

    insert into status_dashboard values (1, "D1", "low", "www.yahoo.com'");

    insert into status_dashboard values 1, 'E1', 'up', 'www.oracle.com';

    insert into status_dashboard values 1, 'F1', 'up', 'www.facebook.com';

    insert into status_dashboard values (1, 'G1', 'down', 'www.twitter.com');

    "insert into status_dashboard values 1, 'H1', 'up', ' www.google.com ';

    insert into status_dashboard values 1, 'I1', 'up', 'www.apex.oracle.com';

    Report query

    SELECT max (case when mod (rn, 3) = 1 then end name) col1

    , max (case when mod (rn, 3) = 2 then end name) col2

    , max (case when mod (rn, 3) = 0 then end name) col3

    , max (case when mod (rn, 3) = 1 then decode (status, 'down', 'red', 'green') end) The_color1

    , max (case when mod (rn, 3) = 2 decode (status, 'down', 'red', 'green') then end) The_color2

    , max (case when mod (rn, 3) = 0 then decode (status, 'down', 'red', 'green') end) The_color3

    , ceil ((rn) / 3)

    (select name, status, row_number() on rn (order by name) of status_dashboard)

    Group by ceil ((rn) / 3)

    order by ceil ((rn) / 3)

    Report link on Oracle Apex

    https://Apex.Oracle.com/pls/Apex/f?p=54850:1

    I created a matrix report, enabled the conditional formatting. The only problem I have right now is to go to a link in the report.

    I use 3 text elements Apex - P1_ID, P1_NAME and P1_URL.

    I use also 3 dynamic actions

    1. DEFINE NAME - will set the P1_NAME field with the value clicked in the report.

    2 SET ID & URL - define the fields P1_ID and P1_URL of the DB using the P1_NAME field.

    3-pop-up-appears the P1_URL using javascript.

    Problem statement:

    The pop up page is a blank page, although I can see that the value for the P1_URL field is defined using dynamic measurements.

    Could someone please take a look at this example and help me with the same.

    PS: The example was developed using sample data.

    Hello

    When you use the substitution in JavaScript string, the value is used when page and is pretty hard-coded in the document value.

    Even if you change the value of the element or the element value in session state, it will not happen to the HTML document.

    In dynamic action, try something like

    popupURL($v("P1_URL"))
    

    Who will choose the value of the item and pass it to the popupURL function.

    Yes, you have created, sample, but how we can view source if we are unable to connect your workspace?

    Kind regards

    Jari

  • Help with dynamic Action with pl/sql and Javascript

    Hi all
    I'm a little hard with the following and I was wondering if someone can help me.
    My test app is here:
    http://apex.oracle.com/pls/apex/f?p=32581
    
    workspace: Leppard
    Login: guest
    pw: app_1000
    
    Tab: DB Link (page 19)
    I have a list of unique selection on the page that queries a table in my diagram.

    This is the flow that works, but not the user experience I want:
    User clicks on the button Create Page 19 > the next page, page 20, appears as a popup window > user enters the name of the link = "MyLink" (or other) and one unit number, i.e. 1234 (or other) > user clicks 'Create using process' button > success message > user closed the window to return to the page 19 > user clicks LOV refresh to refresh the list of selection so that the new value is displayed.

    That's what I'm aiming for: user clicks on the button Create Page 19 > the next page, page 20, appears as a popup window > user enters the name of the link = "MyLink" (or other) and one unit number, i.e. 1234 (or other) > user clicks button "create using the DA ' > dynamic action is called running pl/sql closes the popup window and refreshes the list of selection on page 19.

    I know that I have some problems with my dynamic action. First of all, the pl/sql is not yet recognize the values that I enter the fields in item on page 20. I created a first pl/sql "null;" to force these items in session state, but it does not work for me and the pl/sql just inserts a null value into my table. Secondly, I can't get javascript to fire code to refresh the list of selection on page 19. The code I use in the DA is the same thing as what is behind the button refresh LOV, so I am confident that the code works, I just can't get this fire click the button "create using the DA" on page 20.

    Sorry if this is confusing - I can clarify if necessary, let me know. Thanks in advance. Of course I'm still learning...

    John

    Published by: John K. on May 30, 2013 19:28

    I modified your DA as follows.

    In real Action of DA,.

    1 Seq 10, I added the element page 20 Page points to submit and return Pagenames. You forgot to add items here
    2 Seq 20, I changed your simple code to insert. Simple code just insert
    3 Seq 30, I added the new code to close the window and reload the window open.

    Thank you
    Lacombe

  • APEX 4.0.1: restriction on the 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. Everything works fine on the page.
    If I create another dynamic action that display only an alert or nothing else, I have the HTTP 404 error message when I try to view the page.
    If I delete the old dynamic action and create a new one so that the page works fine.
    After several tests, it seems that there is a maximum number of DA on a page, but if someone can confirm that?

    Environment:
    APEX 4.0.1
    Embedded PL/SQL gateway

    Kind regards
    SDDC

    Hi sddc.

    There is no limit on the number of dynamic action that you have on a page, but it is very likely that you hit a size limit of a variable we use during the generation of the JavaScript code for the dynamic actions. You can activate a log more detailed error further details on your 404 error - see http://www.inside-oracle-apex.com/oracle-apex-got-404-not-found-2/ EPG instructions are in the comments.

    BTW, you might be able to reduce the number of you dynamic actions by specifying page several items in the attribute 'Product (s)' from the 'when' the article if all run the same code. Just separate them with a comma (no spaces). Such as: P1_MGR, P1_DEPTNO

    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

  • How the dynamic Action to update several items based on a JavaScript Expression producing a table?

    Using APEX 4.2.

    I have the list of selection using a LOV which returns a display value and a value separated by a comma e.g. return 'reserved to items' and "66,88" or "Available items" and "90,23".

    I want that return values for example "66,88" to be assigned to two my form fields.

    I have a dynamic action that fires when the field with the changes of the list/select-LOV. I am using an action of 'Set value' and set 'Expression JavaScript' with the expression itself type value ' $v("P1_MY_SELECT_LIST").split(",") and using Type "Article (s)' selection and listing the two points that I want to set as the items in question (from the description of the JavaScript expression field it appears that a table of the results would be assigned to the changed items , in the order.

    However, the original value of the LOV return value is passed to the first of the elements concerned (complete with the comma if the original return value was of the form '10')

    If I add more REAL action of the JavaScript "alert (" HELLO "+ $v ("P1_MY_SELECT_LIST") .split (", ") [0] +" WORLD "+ $v("P1_MY_SELECT_LIST").split (", ") [1]" ") I * see two expected values.»

    Any ideas what I could do wrong?

    The action 'Set value' affects the value specified to all affected elements: a value to one or more items. To set a different value at different points, you need several actions "Set value", or simply use javascript to do it in one.

    Even if you use a javascript expression that corresponds to a table, the table is just being converted to a string again. It creates a mapping of some sort. That is why for example with '10', she also translated as such. Actually you set this value to these two elements: ' 10, ".split(",").toString () (implicit in the chain of course).

    The code makes it very obvious that it doesn't handle values, as described in the help of the element. Aid is not correct or is the implementation simply not here yet?

    Just look at the javascript for dynamic actions, images/libraries/apex/dynamic_actions.js, service da.setValue directory file:

        function _setValue( pValue ) {
            lAffectedElements$.each( function( i ) {
                // Set all affected elements to the value passed
                $s( this, pValue, null, lSuppressChangeEvent );
            });
            /* Resume execution of actions here and pass false to the callback, to indicate no
            error has occurred. */
            da.resume( lResumeCallback, false );
        }
    

    And when you use a javascript expression:

        } else if ( lSetType === "JAVASCRIPT_EXPRESSION" ) {
            _setValue( lJavaScriptExpression.call( this ));
    

    It's pretty simple. (and this is checked on apex 5. It's the same on 4.2)

  • Dynamic action, you see is not the value of session

    Hi all

    I have a small question.

    My case: a person does not have more than 160 hours of work, but this should not be a restriction, but rather a warning.

    My solution:

    Create a dynamic action on a mouse button press which gives a confirmation and if you want to keep a page submit.

    That this dynamic action is a condition that a variable is greater than 160 hours.

    The problem with this method is that it does not work on the first insertion. The validation is not made that the item is null and no hours briefed.

    Option2:

    Create a hidden item to_much_hours.

    Create a dynamic action on hours of work point lose focus that defines the to_much_hours element hidden with the value true.

    Create a dynamic action on a mouse button press which gives a confirmation and if you want to keep a page submit.

    That this dynamic action has a condition that point to_much_hours = true.

    The problem with this method is that it only works when the page submitted. I mean, it's when I try to present awarded more than hours, can I still do it freely.

    But if I try to send more hours and another field is filled in wrong and a validation error is displayed. On the next try the popup of conformation appears.

    Can U help me?

    Raoul

    Hi Raoul,.

    Replace well confirmed by a piece of Javascript code.

    {if (($('#myitem').) (Val()>160)}

    var r = confirm ("hours high are you sure?");

    If (r is true)

    {

    Apex. Submit ('SAVE');

    }

    }

    on the other

    {

    Apex. Submit ('SAVE');

    }

    I'd say it's something like that, there might be errors because I couldn't test. Check the console for errors if it does not work or make an example to apex.oracle.com and we can help you more.

  • help on the use of dynamic action to update the items in a table (more precisely, the radio button) based on the collection

    Hi everyone, I posted this question in the past and made huge strides with the help of Denes Kubicek: https://apex.oracle.com/pls/apex/f?p=31517:294:115851992029365: based on my previous question posted: https://forums.oracle.com/forums/thread.jspa?threadID=2537494

    I'm fighting with a single element in my tabular presentation.  There is a radio button.  The choices all seem correctly, but the value is not saved in the collection (and therefore not recorded in the table).  All the other elements in the form of tables to record properly.

    Here's what I have for the query.   This is element c024 (which maps to;) ("F03'), which is defined as a radio based on an existing LOV LOV.

    Currently I have:

    2 items on the page:

    P110_ID

    P110_VALUE

    Dynamic action called COLUMN of CHANGE:

    event: CHANGE

    selection type: jQUERY Selector

    jQuery:

    Select jQuery = input [name = "f03"], select [name "f08"], select [name = "f09"], input [name = 'f10'], input [name = 'f11'], input [name = 'f12'], select [name = "f40"], input [name = "f21"], input [name = 'f22'], input [name = "f23"], input [name = 'f50']

    scope of the event: Dynamics

    real action #1: set the P110_ID javascript expression this.triggeringElement.id

    real action #2: set the P110_VALUE javascript expression this.triggeringElement.value

    action 3: run pl/sql code

    declare
      v_member number;
      v_seq number;
    begin 
      v_member := TO_NUMBER (SUBSTR (:p110_id, 2, 2));
      select ltrim(substr(:p110_ID,5,4),'0') into v_seq from dual;
      safis_collections.update_column(v_seq,
                                    v_member,
                                    :p110_value);
    
    
    

    refreshment area true creation #4: LANDINGS_COLLECTION

    the tabular presentation is based on the query:

    SELECT
    apex_item.text(1,seq_id,'','','id="f01_'||seq_id,'','') "DeleteRow",
    seq_id,
    seq_id display_seq_id,
    apex_item.text_from_LOV(c004,'SPECIES')||'-'||apex_item.text_from_LOV(c005,'GRADE')||'-'||apex_item.text_from_LOV(c006,'MARKETCODE')||'-'||apex_item.text_from_LOV_query(c007,'select unit_of_measure d, unit_of_measure r from species_qc') unit,
    apex_item.select_list_from_LOV(8,c008,'DISPOSITIONS','onchange="getAllDisposition('||seq_id||')"','YES','0','  -- Select Favorite --  ','f08_'||seq_id,'') Disposition,
    apex_item.select_list_from_LOV(9,c009,'GEARS','style="background-color:#FBEC5D; "onFocus="checkGearPreviousFocus('||seq_id||');"onchange="getAllGears('||seq_id||')"','YES','3333','-- Select Favorite --','f09_'||seq_id,'') Gear,
    apex_item.text(10,TO_NUMBER(c010),5,null, 'onchange="setTotal('||seq_id||')"','f10_'||seq_id,'') Quantity,
    apex_item.text(11,TO_NUMBER(c011),5,null,'onchange="getPriceBoundaries('||seq_id||')"','f11_'||seq_id,'') Price,
    
    apex_item.text(12, TO_NUMBER(c012),5,null, 'onchange="changePrice
    ('||seq_id||')" onKeyDown="selectDollarsFocus('||seq_id||',event);"','f12_'||seq_id,'') Dollars,
    decode(c013,'Y',apex_item.text(14, c014,30,null,'style="background-color:#FBEC5D;" onClick="onFocusAreaFished('||seq_id||');"','f14_'||seq_id,''),'N','N/A') Area_Fished,
    decode(c017,'Y',apex_item.text(18, c018,4,null,'style="background-color:#FBEC5D; "onBlur="setUnitQuantity('||seq_id||')"','f18_'||seq_id,''),'N','N/A') UNIT_QUANTITY,
    decode(c017,'Y',apex_item.text(19,'CN',3,null,'readOnly=readOnly;','f19_'||seq_id,''),'N','N/A') UNIT_COUNT,
    c024 hms_flag,
    decode(c050,'Y',apex_item.checkbox(21,'Y','id="f21_'||seq_id||'" style="background-color:#FBEC5D; " onClick="alterYes('||seq_id||');" onKeyPress="alterYes('||seq_id||');"',c021),'N','N/A') FinsAttached,
    decode(c050,'Y',apex_item.checkbox(22,'N','id="f22_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterNo('||seq_id||');" onKeyPress="alterNo('||seq_id||');"',c022),'N','N/A') FinsNotAttached,
    decode(c050,'Y',apex_item.checkbox(23,'U','id="f23_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterUnk('||seq_id||');" onKeyPress="alterUnk('||seq_id||');"',c023),'N','N/A') FinsUnknown,
    decode(c050,'Y',apex_item.textarea(28,c028,3,null,null,'f28_'||seq_id,''),'N','N/A') Explanation,
    decode(c024,'N',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'U',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'Y','N/A') Nature_Of_Sale,
    decode(c020,'Y',
    apex_item.select_list_from_LOV(40,c040,'HMS_AREA_CODE','style="background-color:#FBEC5D;"',null,null,null,'f40_'||seq_id,''),
    'N','N/A') HMS_AREA_CODE,
    c020,c050,
    decode(c020,'Y',
    apex_item.text(41,TO_NUMBER(c041),5,null,null,'f41_'||seq_id,''),
    'N','N/A') Sale_Price
    from apex_collections
     where collection_name = 'SPECIES_COLLECTION' order by seq_id
    
    
    
    
    
    

    I noticed the following:

    When I change the column C011 (price) the following values are defined in dynamic action:

    P110_ID = f11_1

    P110_VALUE is everything that I change the price.

    When I change the column C024 (hms_flag), the following values are defined:

    P110_ID = f03_0001

    P110_VALUE = change everything what I hms_flag to.

    the region is updated in my dynamic action, and change of hms_flag does not take.  I tested the SQL query that generates the value of v_SEQ in the dynamic action.   Both a change of price and HMS_FLAG, it seems valid

    Select ltrim (substr(:p110_ID,5,4),'0 ') in the double v_seq;

    If f11_1, v_seq: = 1

    If f03_0001, v_seq: = 1

    Thank you!

    solved.  sort of.

    domain c024 references f03.

    dynamic ACtion, step 4 calculated v_member as a substring of P110_ID... and in all other areas, the column and the field (fxx) displayed the same value... otherwise c024.

    I'm not exactly sure how solve it, but see the problem.

  • Dynamic action - check if the size of the texfield values does not exceed limit

    Hello

    I have a form and I'm trying to use dynamic Action to process the form values. I don't know how to get the length of the value of a textfield and compare to what I said in the values

    The order of the day called P6_USERNAME which can be more than 10 characters long.

    So I tried to create a dynamic Action with the following parameters in the region when .

    EVENT: Press button
    SELECTION TYPE: jQuery Selector
    jQuery SELECTOR: $("P6_USERNAME").val () .length
    CONDITION: above
    VALUE: 10

    Of ACTION GENUINE, I had a view only showing a message "you have exceeded the limit.

    The above didn't work and tried to work it around with:

    $v("P6_USERNAME").val () .length

    that no longer works.

    Any suggestions on how I can achieve this? The only options I got in the Type of selection are: point, area, object DOM and jQuery Selector. What I'm really after is retrieving the value of the element, so I can use it for comparison with the value to run my Real Action

    APEX 4.0 - Oracle XE 11 G - Windows 7 32 bit

    It is not necessary to use a validation/dynamic action. Set the maximum width for the element attribute and the browser will prevent users to enter values longer than that.

  • Static id usage problem of IR region with dynamic action

    Hi all,

    I have this dynamic action:

    Event: after refresh

    Selection type: region

    Region: region_name

    Condition: no strings attached

    Action: run the JavaScript Code

    this.affectedElements.find ('td [headers = "Alternativen"] table.apexir_WORKSHEET_DATA') .each (function (i) {}

    var lThis = $(this);

    If (lThis & & lThis.text ()! = "" & & lThis.text ()! = "-") {}

    lThis.parent () .children ().css({"background-color":"#7da08a"});)

    }

    });

    $(".apexir_WORKSHEET_DATA") .find ("[headers = 'Alternative']") () .hide;

    $('#Alternativen').hide ();

    I've added a static id called #search_report for a specific use, since this dynamic action does not work, I tried to put in the Type selection of the elements concerned section: jQuery Selector and

    jQuery Selector: #search_report but still does not work. Any help

    aymen_tunisia wrote:

    After many tests, I change the Type of selection to JQuery selector and put table.apexir_WORKSHEET_DATA as the value for JQuery selector tr, it only works for the first page

    Change the scope of your da static to the dynamic.

    Kind regards

    Vincent

    http://vincentdeelen.blogspot.com

  • APEX 4.2 limiting size of the value dynamic Action

    Hi all, I'm using ApEx 4.2.5 with 11 g BD and stumbled on this problem.

    I'm trying to set the value of a div within an HTML region. To do this, I use one set dynamic Action launched by a custom event "search" when user press enter or click OK to a search bar. I also use the PL/SQL function as set type body.

    I tested it and it works fine except if the content of the value is large enough (about 30,000 characters or more). I can't find any information about a size limitation for the return value of this type of package. I get this error code: ORA-06502 when I'm looking for a big content, and it seems that this error may occur when "you attempted to assign a value to a numeric variable, but the value is greater than the variable can handle", but I'll be back a PL/SQL CLOB variable in a div, so I don't see any kind of limitation. I think the limitation can be in the call made by apex in the background AJAX...

    I need help on this, thanks in advance.

    Gaël

    Hi gados12,

    gados12 wrote:

    OK, I tried something and the result is weird.

    I created a pakaged function to retrieve the right HTML content that is stored in my CLOB column (because I reached the limit of characters for PL / SQL code in dynamic action)

    So I called my function (allows to name it FNC_GET_SEARCH) my previous dynamic Action Set value. I still get the same error with large HTML content. However... it is there, it's weird.

    So that means the error is not my FNC_GET_SEARCH function, but the dynamic Action itself... So there must be some kind of limitation with this kind of dynamic action?
    Is it because the dynamic action to set the value using the package HTP in the background?

    The DA type 'Set Value' is for session state implementation and display the value of an element of page APEX value that is defined internally as VARCHAR2 (4000).

    As a result, you get the above error. Use the approach mentioned above to manage CLOB based rendering html.

    Also of your FNC_GET_SEARCH function for the display unit test error message.

    Kind regards

    Kiran

Maybe you are looking for