Failed to create a dynamic action ALERT to build a Select list when selecting a particular value.

Hi everyone, this should be so easy, and yet I'm stuck.

I have a form with a P110_VESSEL_ID element.   This article is a list of selection.   It is based on the query:

Select distinct v.vessel_name, v.vessel_id

of ships v, frequent_fishermen ff

where ff.dea_permit_id =: G_PERMIT_ID and

FF:vessel_id = v.vessel_id

UNION

Select v.vessel_name, v.vessel_id

of apex_collections v, vessels

where collection_name = "SUPVES_COLLECTION" and

a.C002 = v.vessel_id

If the user decides from the values in the selection list query, they can opt to SELECT all THE VALUES.  This SELECT all VALUES is a TEXT of ITEM POST on P110_VESSEL_ID.

< a id = "popVessels" href = "#" > < font color = blue > select all < /a > ships

It all works very well.

The problem is that when the user selects a boat name = "UNKNOWN" and it is corresponding to the value of vessel_id, I want an ALERT to appear indicating that they should check that the boat is UNKNOWN and no one's any ship.

I created a dynamic action

event = change

Select type = item

Item = P110_VESSEL_ID

Real ACtion #1 is the ALERT.

Currently, I have no other logic, but can't even get this working.  All thoughts.   I also tried the SELECT TYPE = jQuery Selector = select [name = "P110_VESSEL_ID"], but that does not work either (although I am not sure if the value must be P110_VESSEL_ID or static VESSEL_ID name).

Any help is appreciated.

PS. the page is not submitted when the ship is changed.  There are other data that should be in this region and others and many validations run when submit to submit would not be an option.

Thanks again,

Karen

Is (BOAT = UNKNOWN) a single value with a single vessel_id? If Yes and for example if the vessel_id is 99, then proceed as follows:

Add an expression "JavaScript" in your dynamic action.

In the Condition value, enter:

this.triggeringElement.value == "99"

-Jeff

And I agree with Nicolette, there is something wrong with some other DA who is at the origin of the DAs after that does not work.

Tags: Database

Similar Questions

  • Can not set a value by the executed dynamic action on the page element "selection list."

    I created an agenda of the page 'list of selection' and I want to when I change a value in another element of the page set only 'screen '.

    I created a dynamic action on the page element "selection list" for this.

    These are the dynamic action attribute:

    When:

    ======

    Event: change

    Selection type: point

    Article: P29_PURCHASE_ORDER

    Condition: No strings attached

    Advanced:

    ========

    Scope of the event: static

    Identification:

    ==========

    Action: Set

    The ' Action Page when the changed value "attribute of the element of 'list of selection' = 'None', and when I run form the dynamic action run and set the value for once and do not update the value according to the change in the article"list of selection. "

    Note: when I change the previous attribute of 'Redirect and set', dynamic action run and properly value, but the value was hidden soon

    I want to value when the value of change of select list according to this change successfully.

    Please, advice me,

    Best regards

    Mustafa Ezzat

    Hello

    you set the value of the 'Page elements to submit' to P29_PURCHASE_ORDER?

    Then, the SQL statement would use the current selected value.

    This is the help text says: "specify a list separated by commas of the elements of the page that will be submitted to the server and therefore available for use in your"SQL statement"," PL/SQL Expression"or"Body of the PL/SQL function".»

    Kind regards

    Erik-jan

  • How to create a dynamic action with a button?

    Hello, I created a dynamic action with a button, which should show a region of the page When you click.

    What I have to enter in the State et value of the condition?

    Thank you

    Hello

    1. in doSubmit ("ACCEPT");

    ACCEPT is nothing than the name of the button, but I hope that you have created the name of the button as "BELOVED".

    $2 s ('P57_ACCETTA', 1);

    $s('P57_ACCETTA',1)---> all by setting the value you give space. Make the changes and check.

    And you enter this script in the HTML header.

    If possible you can send your page with the credentials so that will look.

    -SreeNithi.

  • Dynamic Actions: is it possible to combine several 'when? '

    I'm trying to activate a 'Create' button only if ALL the required fields are not null. Otherwise, it should be disabled.

    If I create a dynamic to this end Action, even if I select several items, the action is triggered when a field is not null.

    I need to understand how to tell Apex: this action is triggered when A AND B AND C are not null.

    Any idea?

    Thank you

    Use a javascript expression for when the condition. Use JavaScript APIs: apex.item (NDP) .isEmpty () to check if an element is empty or not. Mix with Boolean operators.

    For example:

    P1_ITEM1 is not empty and P1_ITEM2 is not empty:

    !apex.item( "P1_ITEM1" ).isEmpty() && !apex.item( "P1_ITEM2" ).isEmpty()
    
  • Failed to create a dynamic group

    Hi all.

    Today, I created a few dynamic groups for a new dash I think.

    These groups dymanic says all preparations of data available in each cluster I have in my environment.

    The rules of dynamic groups database is like this:

    [ALL] [Descendants of] [Contains] [Cluster1]

    [Datastore] [Total number of hosts] [more] [1]

    These two rules return all data warehouses that are part of the 'group 1', and are visible to more than 1 guest.

    so far everything works beautifully.

    My problem is that one of my groups, lets call it 'Cluster 10', this does not work,

    Although there are data warehouses in this group to each another bunch of mine.

    also - when I try this rule of thumb:

    [ALL] [NAME] [Contains] [name datastore]

    I still get no items selected by the preview.

    I check under "Overview of the environment", I see data warehouses that I can't come up with the basis of rules,

    "and I checked 'State Collection' and status of the Collection" are (all green) work orders

    Grateful for the help here

    Thank you

    iQuad.

    mm sounds like something's screwed up.

    Is he still collect data on these data as in metrics stores are all to date?

    I might delete data for vCOPS warehouses and see if they are picked up, they should and it would be a new id of the object. You should be able to remove them from the presentation of the environment in the custom user interface.

  • Dynamic action - compare the elements in Date - Show Alert

    This is my first attempt to create a dynamic Action. I am creating a dynamic Action that displays an alert if a user enters a date in an article in date picker (P1_DATE1), which is less then another date in a different element (P1_DATE2).

    Event = change
    Select Type = item (s)
    product (s) = P1_DATE1
    Condition = less than
    Value = <? >

    If the condition is true, it must trigger an action type 'alert '. The alert text should read something like "Date1 precedes Date2.

    I'm not sure what syntax to use in the value element. It seems not that I element values in the element of reference value.


    How can I create a dynamic Action that will assess if P1_DATE1 < P1_DATE2 when P1_DATE1 is changed and show a warning if this is true?

    Kind regards
    Todd

    Change the status of "javascript expression", and then assign the expression $v ('P1_DATE1')<$v('P1_DATE2'). then="" add="" a="" true="" action="" in="" which="" you="" do="" the="">

  • The dynamic action of javascript

    Hello

    Good evening.

    I am aware, that we can trigger dynamic actions in multiple ways, based on events of the DOM.

    can someone help me triggering a dynamic javascript action.

    But not based on events.

    Ex: name action dynamic, based on its name or sequence or in any other way.

    There are situations where I have to call dynamic measures to avoid hand-written Ajax calls.

    Thanks in advance

    Hello

    The correct answer to this post:

    Not sure why the following code lines failed to trigger a dynamic action

    $("#P0_SIGNAL").val (123) .changes (); --Also failed
    $("#P0_SIGNAL").trigger ("change");  --Also failed

    This line would trigger a dynamic javascript action.
    Apex. Event.Trigger ($("#P3_TEST_ID"), "change","" ");


    Steps to make it work.


    I need to trigger a dynamic action when a value is set to hidden JavaScript element


    P3_TEST_ID is a hidden item.

    Create a dynamic action to shoot the P3_TEST_ID change event.

    Setting the value of p3_test_id of javascript wouldn't trigger a dynamic action.

    Run the following code to fire the javascript DA

    Apex. Event.Trigger ($("#P3_TEST_ID"), "change","" ");

  • 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.

  • can a column of 'link' (classic) report trigger a dynamic action?

    In order to avoid a complete package and following flicker,

    can the link associated with a column of the classic report

    somehow trigger a dynamic action?

    Something along the lines of

    1. run few PL/SQL (some parameter passing along)
    2. refresh a page region to reflect the changes brought about by the (1)

    In practice, I have a page that emerges already, master/detail

    with the need to manage another set of detail records.

    I can collect a bunch of fields that are not related to the db.

    and generate an insert + update via a button 'Add '.

    Then the report containing the details is updated

    provide visual feedback that a new record has been added

    Indeed, with a column 'delete '. The integrated link is

    currently a javascript that saves the underlying m and

    Removes the secondary details, but it involves a shipment

    and refresh the entire page. It can be avoided?

    (running apex 4.2.1)

    You can use the onchage event to create your dynamic action. Make sure that there is a hidden page element (value not protected). From your link to classic report column, set the value of the page element hidden by using the JavaScript API $s () that will trigger the dynamic action of the onchange event.

    javascript:$s('P1_HIDDEN_PKEY_ID',#ROW_PKEY#);
    

    Thank you!

    JMcG

  • Dynamic action - text - ALERT

    I created a dynamic Action for the ALERT and in the 'text', I want to display a page Variable value. I typed in &. P1_X and the value is displayed with a null value. I checked that there is some value in P1_X such that is displayed on the Page.

    Ajay

    Hello

    create action type "Run JavaScript Code"

    Enter the following in the Code

    Alert (document.getElementById("P1_X").value);

    Concerning

    Salim

  • Dynamic action to execute PL/SQL that calls a JavaScript alert - does not

    Greetings,

    I'm stuck!  I use the Apex Version 4.2.2.  I have a requirement that, when the user fills Field1, I check the database to see if the value of field1 has already been used.  If it was used, I have to inform the user, but the user is allowed to reuse the value - that is to say, duplicates are allowed.  My thought is to use a dynamic action to check the onchange of value running pl/sql to check (via a function in the database) and if it returns true, use a javascript alert to inform my user value is used.  They can then close the alert and change (or not change) the duplicate value

    I did the following:

    1 wrote a PL/SQL function in my utility package in the database - we'll call it apps.my_utils.check_value_use (p_my_val in varchar2) return Boolean - it works.

    2. created a dynamic Action with the following properties for P1_FIELD1:

    Event: change

    Selection type: item (s)

    Product (s): P1_FIELD1

    Condition: is not null

    3. the dynamic Action has an action - real Action

    Action: Execute the PL/SQL Code

    Page items to submit: P1_FIELD1

    PL/SQL code:

    BEGIN

    IF apps.my_utils.check_value_use(:P1_FIELD1) = TRUE THEN

    HTP.p ("< script type =" text/javascript "> '");

    HTP.p ("alert (" this value is used ""); ")

    ');

    HTP.p ("< /script >" ");

    END IF;

    END;

    When I run the page and fill in Field1 with a value that I know is in use, I get the following error:

    Error: parsererror - SyntaxError: JSON.parse: unexpected character

    Help, please.  I already spent too much time on this apparently simple requirement.

    Thank you

    J.

    BEGIN

    IF apps.my_utils.check_value_use(:P1_FIELD1) = TRUE THEN

    HTP.p(' ');

    END IF;

    END;

    Avoid doing this. Try the following method:

    (1) create a dummy hidden element to store the result of your validation of PL/SQL. Lets call it P1_DA_ERR

    (2) in your PL/SQL block put this point hidden in the field "Page point back.

    (3) in your PL/SQL block placed the result of your validation in this element hidden as

    DECLARE
    l_err PLS_INTEGER := 0;
    BEGIN
    -- An example
    IF 1=1 THEN
    l_err := 0;
    ELSE
    l_err := 1;
    end if;
    :P1_DA_ERR := l_err;
    END;
    

    (4) add a true other "Run Javascript code" type action. The could should look like:

    if(parseFloat($v('P1_DA_ERR'))==1)
    {
    alert('Error occurred');
    }
    
  • Can a dynamic action of type 'alert' display a value of field without javascript?

    Hello

    can a dynamic action of type 'alert' display a value of field without javascript ( alert ( $x (P '200_OP').value)); ?

    What should I write in the 'text' section to display in the alert, the value of P200_OP for example?

    Gianpaolo cordially

    Hi gianpagi,

    gianpagi wrote:

    I know that with "run JavaScript Code" works. My question is about action as 'alert '.

    Dynamic action "Alert" is expected to this only the string to display in the alert. May not be able to access the current value set in a page element.

    Therefore, "Run the Code JavaScript" only works in this case where your can integrate the current values of the DOM html elements

    If you notice that da 'Alert' request 'Text' and 'Execute JavaScript Code' DA 'Code' request to be executed.

    Kind regards

    Kiran

  • Dynamic action to email from automatic calculation of the fields in the form created in the APEX firstname and lastname

    Hello

    I am working in the form based on the employees table. I have email_id (P169_EMAIL_ID), last_name(:P169_LAST_NAME) and 3 fields/items first_name(:P169_FIRST_NAME). I am trying to create a dynamic action Auto Fill the id field of electronic mail with the email ID immediately when the user enters first name and family name, he clicks on the e-mail id field. Please help me with suggestions for the code I should use in dynamic action. For example, if a user enters rakesh in the first name field and choudhury to registered name the by clicking the id field e-mail should automatically show [email protected]

    Thanks in advance!

    Hello

    957450

    You need to change your name to something more appropriate

    I work in the form based on the employees table. I have email_id (P169_EMAIL_ID), last_name(:P169_LAST_NAME) and 3 fields/items first_name(:P169_FIRST_NAME). I am trying to create a dynamic action Auto Fill the id field of electronic mail with the email ID immediately when the user enters first name and family name, he clicks on the e-mail id field. Please help me with suggestions for the code I should use in dynamic action. For example, if a user enters rakesh in the first name field and choudhury to registered name the by clicking the id field e-mail should automatically display [email protected]

    You can use a DA to set the email in the agenda of the Email page when there is a change in the maybe the first name of the person if it follows in the order you presented above.

    E.g.

    Event: change

    Point: P169_LAST_NAME

    Action: Set

    Fires when the event is the result: true

    Parameters

    Set tYpe: PL/SQL body Funtion

    declare
    l_email varchar(40);
    begin
    l_email := :P169_FIRST_NAME||'.'||:P169_LAST_NAME ||'@oracle.com' ;
    return l_email;
    end;
    

    Page items to submit: P169_FIRST_NAME, P169_LAST_NAME

    Items concerned:

    Article: P169_EMAIL_ID

    NB: I recommend that you look at the dynamic Actions of the sample under the application package.

    Hope this helps

    Kind regards

    Benjamin.

  • Dynamic action has failed

    Apex 4.1

    There are 2 items in a form on the Page 3, P3_REG_ID and P3_SUBMITTER_ID.

    I put like sender id = reg_id when reg_id has changed, so created the dynamic action on the point P3_REG_ID, but P3_submitter_id has not changed no matter what did P3_reg_id.

    What I did:

    {code}

    Event: change

    Selection type: point

    Article: P3_REG_ID

    Conditions: null

    Real action:

    Set type: PL/SQL Expression

    PL/SQL expression: P3_REG_ID

    Items affected

    Selection type: point

    {code}

    Who can help me? Thank you very much

    Article: P3_SUBMITTER_ID

    set the action type to set the value

    and don't forget to put the issue to "Elements of Page to submit" attribute.

  • How to create dynamic action of the link column in the classic report

    I have an apex page to display a modal window using jquery. In the modal window, I have a classic report with a column of link I want to capture its click event.
    I thought I could create a dynamic action with selection of type = jquery selector. Not sure if I need to do anything on the link column and do not know the syntax
    jquery selector. Would appreciate help or direction?

    Always zip code using .

    ...\
    

    tags as described in the FAQ.

    I created a region of report with the following query:

    Select empno, ename, 'SELECT' from emp
    where (ename like '%'||ltrim(rtrim(:P2_SEARCHPU))||'%'
    or :P2_SEARCHPU is null)
    

    There is no alias specified for the "SELECT" column, Oracle uses so the content of the column as a default alias. It comes

    'SELECT'
    

    Instead of

    SELECT
    

    The necessary jQuery selector would be:

    td[headers="\'SELECT\'"] a
    

    However the need to release the single quote everywhere is a ticking time bug. SELECT an Oracle reserved word means use it as any type of identifier is either too smart.

    You should always use a valid Oracle identifier as an alias explicit when a column contains a literal value or a complex expression:

    select
        empno
      , ename
      , 'SELECT' link_text
    from
        emp
    where
        (  ename like '%'||ltrim(rtrim(:P2_SEARCHPU))||'%'
         or :P2_SEARCHPU is null)
    

    APEX will use the column alias LINK_TEXT as the ID attribute of the column header and the cells in the column will reference it in their headersattributes. The jQuery selector is:

    td[headers="LINK_TEXT"] a
    

Maybe you are looking for

  • How can I remove a black background for iMovie version 10.1.1

    I realize you can remove backgrounds, green, and blue, but can someone please tell me how I can remove a black background on the images.

  • Can I charge a battery R100 base separately?

    Hello everyone Tell me pls a thing. I intend to buy the second battery of 3 cells standard (PA3154U) for my laptop R100. How can I load one separately of the laptop?Toshiba Slim Port Replicator help?

  • Problem with iTunes on Apple TV

    For some reason any when I play "my [iTunes] (music on Apple TV ((troisieme generation), the display of the list of artists and albums on the TV is not completely synchronized with the albums and artists on my iMac." ITunes displays on my other devic

  • Sony VPL-HW30AES projector

    Im having trouble with the correction of the trapezoidal distortion on my Sony projector VPL-HW30AES Uni

  • Microsoft Lifecam Studio freezes frequently

    Can someone tell me why this is happening? I didn't start playing the drums with the students, but this CAM keeps freezing upwards. I have 5 m USB extension, enter a laptop Dell Inspiron 32-bit software. Kind regards Marco