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

Tags: Database

Similar Questions

  • How do dynamic actions using work to set the value in all browsers?

    I'm having a problem of incompatibility between browsers with dynamic actions to help to set the value.  Dynamic action works like a charm on Chrome but has no effect on IE or Firefox.  The code in oracle.apex.com and here are the credentials:

    Workspace: DDBA

    Username: [email protected]

    Password: redtruck12

    These codes is on page 3 and here are the details:

    There are two lists of report (Standard and special) and some reports require additional information provided in the lists of selection or text boxes.

    If the user selects a report select Standard requiring a list/text box, then the dynamic action sets the value of the special reports to NULL (and vice versa).

    Dynamic action is to prevent a simultaneous Standard reports and special selection.  To see how it works on Chrome, follow these steps:


    1. Run the Page 3
    2. Select the "Search report" option in the list Report Standard .  A text 'Search criteria' box
    3. Select the option 'Release report' in the list of special reports .  A selection list appears and disappears from the text box 'search criteria '.

    If you do the same on IE or Firefox, the text box does not disappear.

    Hi Edward,.

    Please check page 4 of your app, I made a copy of your page and made a few changes:

    I have set up an example of dynamic action 1 this hanles the report and special report selection list.

    Dynamic action games, select the value of the selection list and he accompanies in detail the report lists to null and then submits the page.

    For this I have deleted the page submit events to the time the report and special report select lists. Instead I handed them a HTML class. The dynamic action is triggered by a change of this category of html.

    When the trigger is the report selection list, select special report is set to null. Also underlying selection sub lists are set to null.

    When the trigger is the special report selection list, the selection of the report is set to null. Also underlying selection sub lists are set to null.

    The two end of the action with a "Send" page to manage the show and hide appropriate items. Note that there is a lag in time due to the submission of the page. As I have suggested, it would be treated better by a refresh of the region. On the other hand you depend on now submit for the continuation of the treatment of your page. With the help of an update of the region would require a work more javascript and cost more redisgn of your page. If you need IE8 support, additional javsascript likely to cause other unexpected behaviors. In other words, a page is maybe in your case probably better then an update of the region after all.

    I checked this page 4, Chrome, Firefox and IE (latest version) and I get the same behavior in all browsers.

    Kind regards

    Vincent

    http://vincentdeelen.blogspot.com

  • Dynamic action - two types of options of "condition"?

    I would like to create a dynamic action that runs when a SQL condition exists is met.  If this is the case, then it will run several true Actions.  If this isn't the case, it will run several wrong Actions.

    I see there is an option of Condition in the when section of her DA, however, seems to be limited to static value comparisons or Javascript.  There is also another section of Condition where you can select SQL exists or various other PL/SQL expressions.  What is the difference between these options two condition?

    Also, when I set the status section to Exists and in the SQL query include an equivalence to an element of the page it does not seem to recognize the value of the page element. For example:

    Select * from my_table

    where PARTY_NUMBER =: MY_PARTY_NUMBER

    It still fails the condition even when a valid part number is entered on the page (him DA is run when MY_PARTY_NUMBER is changed).  I should be able to enter a reference point of page here, Yes?

    Thank you

    Steve

    P.S. I use 5 APEX

    Steve. 1234555 - Oracle wrote:

    I would like to create a dynamic action that runs when a SQL condition exists is met.  If this is the case, then it will run several true Actions.  If this isn't the case, it will run several wrong Actions.

    I see there is an option of Condition in the when section of her DA, however, seems to be limited to static value comparisons or Javascript.  There is also another section of Condition where you can select SQL exists or various other PL/SQL expressions.  What is the difference between these options two condition?

    Also, when I set the status section to Exists and in the SQL query include an equivalence to an element of the page it does not seem to recognize the value of the page element. For example:

    Select * from my_table

    where PARTY_NUMBER =: MY_PARTY_NUMBER

    It still fails the condition even when a valid part number is entered on the page (him DA is run when MY_PARTY_NUMBER is changed).  I should be able to enter a reference point of page here, Yes?

    N ° you won't achieve what you're trying to do. The standard Condition section in dynamic action controls if the code of the dynamic action is rendered the see page. It has no impact on the question of whether the actions of true or false are performed during the intervention of the user. Control conditions which are those defined in the when the properties of the dynamic action. As they are evaluated in the browser, they must be specified as JavaScript.

    To perform actions conditionally based on the existence of rows in a table requires DA type body of the PL/SQL function or SQL, submitting the values of the requested page, runs the necessary query and returns a value to an element of [probably hidden] page, followed by either an action to run Javascript Code containing conditional logic , or another DA triggered by a change on the hidden element event.

  • can the dynamic action call function already?

    I have a dynamic action that keeps a total on the screen for two columns of numbers.

    Now I need to have a total cumulative where X column > column Y. I don't know if I can do that in an expression javascrip t. I had hoped to call a JavaScript function that returns the value... but the function does not return anything right now.


    This could be a thing of syntax sillly - I hope so, but before you spend more time looking for in this I but I would like to ask - is it still possible?

    Assuming that column1 is apex global table 1(name=f01) and column 2 picture 2 (name = f02).
    Name of the item page that show the total operation: P100_TOTAL
    Dynamic action
    Event: change
    Triggered by: jQuery selector
    selector: * input [name = f01], input [name = f02] *.
    Event type: javascript

    var total = 0;
    /* Go up untile report table */
    var this_table = $(this.triggeringElement).parents('table:first');
    
    /* Loop through each report row */
    this_table.find('tr').each( function(){
    var colX = ( $(this).find('input[name=f01]').val() == ' ') ? 0 : parseFloat(parent_row.find('input[name=f01]').val() );
    var colY =  ( $(this).find('input[name=f02]').val() == ' ') ? 0 : parseFloat(parent_row.find('input[name=f02]').val() );
    /* Add colX if its greater than Y */
    if ( colX >colY)  {
       total += colX;
      }
    }
     /* Assign Page itme with total*/
    $s(' P100_TOTAL',total);
    
  • 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.

  • PL/SQL in dynamic Action seems to return an incorrect value

    Hi all

    I am very new to the Apex and PL/SQL, so I don't know if I did something wrong here.

    I have a form with a shuttle service (P4_ITEMS) and a field display only (P4_ORDER_TOTAL). I have a dynamic action put in place with the following PL/SQL:

    declare
        tab apex_application_global.vc_arr2;
        total number := 0;
        itemPrice number;
    begin
        tab := apex_util.string_to_table (:P4_ITEMS);
        for i in 1..tab.count loop
            select PRICE into itemPrice from PRODUCTS where PRODUCT_ID = tab(i);
            total := total + itemPrice;
        end loop;
        return total;
    end;
    

    If I understand correctly, tab must contain all the elements that are in the 'selected' part of the shuttle. I try to summarize the prices of selected items and return the set. Pretty simple, right?

    Here is some info on the dynamic Action itself:

    Event: Change; Selection type: Article (s); Article (s): P4_ITEMS (the shuttle)

    The event (the PL/SQL function running) is also set to pull on the loading of the page. It is near the top not to expect results, so during the calculation, display field disappears briefly.

    Here's the number: P4_ORDER_TOTAL updates only correctly when I first load the page. I enabled debugging but I changed my Shuttle, then checked out.

    He recorded the P4_ORDER_TOTAL element. In this case, we will say it was 363.08. I added an item on the agenda and the PL/SQL is executed. The result, however, is 363.08, although he should have gone to the top. If I leave the page and then click its tab again, the order is always there, except that this time that it runs again the PL/SQL and it updates the P4_ORDER_TOTAL field to the correct value.

    Can someone explain what is happening here? I can't understand why it isn't like I intend to work.

    Feel free to ask me more questions if I'm not well explained.

    Thanks in advance!

    klanchman wrote:

    I am very new to the Apex and PL/SQL, so I don't know if I did something wrong here.

    Always include the following information in your question:

    • Full version of APEX
    • Complete version/edition/host operating system database
    • Server Web architecture (EPG, SST or APEX listener/operating system host and versions)
    • Browser (s) and version (s) used

    For the layout and Visual set formatting issues. also include:

    • Theme
    • Type of zone
    • Models used

    Here is some info on the dynamic Action itself:

    Event: Change; Selection type: Article (s); Article (s): P4_ITEMS (the shuttle)

    The event (the PL/SQL function running) is also set to pull on the loading of the page. It is near the top not to expect results, so during the calculation, display field disappears briefly.

    Here's the number: P4_ORDER_TOTAL updates only correctly when I first load the page. I enabled debugging but I changed my Shuttle, then checked out.

    He recorded the P4_ORDER_TOTAL element. In this case, we will say it was 363.08. I added an item on the agenda and the PL/SQL is executed. The result, however, is 363.08, although he should have gone to the top. If I leave the page and then click its tab again, the order is always there, except that this time that it runs again the PL/SQL and it updates the P4_ORDER_TOTAL field to the correct value.

    Can someone explain what is happening here? I can't understand why it isn't like I intend to work.

    At the time the dynamic action is executed, the value of P4_ITEMS is not available for the PL/SQL code in session state, it takes place only in the browser. Include P4_ITEMS in elements of Page to submit property the dynamics of the action so that the changed value is updated in the State of session before the PL/SQL code is executed.

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

  • activation / deactivation of field with dynamic action and apply the attribute 'required value.

    Hello

    Wanted to know how to force the 'required' attribute for the element off after that is "activated" by a dynamic action.

    For example, consider employee form.  I would like to disable the column of employment and salary.  As soon as the user enters the name of the employee, I will 'activate' JOB and SAL columns using "dynamic action".

    IMG-1.png

    IMG-2.png

    And above works fine.  Please note that both JOBS & SAL of columns 'NULL' according to the DB table.  My question is, how to comply with the condition of 'value' Yes, after allowing them.

    Another example would be, when the user selects 'Check' or 'Project', the 'no project' column will be activated.  Otherwise, "Project No." column is disabled (that is, the value is not required).  However, when turned on, I want to apply "value required" in this column.   How to get there?   (I use APEX 4.2.6)

    Thank you

    -Anand

    Why you do not create a function that returns a Boolean, validation of the page?

    You can do something like

    BEGIN

    IF: P5_ENAME IS NOT NULL THEN

    IF: P5_JOB IS NULL THEN

    Returns false;

    ON THE OTHER

    Returns true;

    END IF;

    END IF;

    END;

    You can change it to any desired column.

  • Need help displaying the value of field in another!

    I have a problem, I'm sure is simple but I can't understand it.

    I would like to create a field that displays the value of a field point selecteed in drop down. For example, I created a drop down menu which has 3 times that I have assigned values to each:

    Items in drop-down list

    point: Unlimited time export assigned value: 4 000,00

    point: 8-hours coverage export value assigned: 3,000.00

    point: 5 hours Covrage export value assigned: 2,000.00

    This drop-down list is named "CoverageTime".

    I want to create a text called 'Price' field that will display the value of the selected 'CoverageTime' element drop-down list.

    For example, if I chose "Unlimited" (which I have highlighted as 4,000.00) in the drop-down list, the 'Price' of text field should display the value of 'CoverageTime' of 4 000,00.

    As you can see in my screenshot, I have selected ' Unlimted Time'. The value that I put to this element from the drop-down list is 4,000.00. But the price text field does not the value of the element "Unlimited time", selected in the drop-down list.

    How to make this happen? (Sorry for the picture on the side)



    I'm not sure what you mean about #1 (there is nowhere where to put the code in the tab Options), but it's okay because the second is on the right track. But to set the value of the field, assign anything you want event.value. So the correct code for the custom script to calculate the price of the text field:

    The value of this field for the price of the value selected from the drop-down list

    Event.Value = getField("CoverageTime").value;

  • 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');
    }
    
  • 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.

  • dynamic action sets the value of the element, but not save to DB on submit

    I'm working on a page where the value of several to show only the page elements are defined using a dynamic Action.  They are set when the user selects a value in a list of selection (and is based on the value of the selection list).  Dynamic action is triggered on a list selection change event and then runs the real action "set the value.  The selection list displays the names of sales representative.  The three fields dynamically filled are the org structure (that is, their chain management).

    For the action to set the value, I use a defined Type of SQL statement:

    Select VP, DIR, MGR

    of SALES_ORG where SSR =: P20_SSR

    In the affected elements, I have fixed Type of selection to the 'item (s)"and the value of the Item (s) for 'P20_GVP, P20_DIR, P20_MGR.

    Dynamic action works fine for the display of the page (that is, when I select a sales representative in the selection list dynamic action properly updated only display value fields three).  This page is a form in which the user submits information relating to the rep.  When the page is sent, all fields are filled in a new record of DB with the exception of three that were populated dynamically above.  These fields get the values NULL.

    When the dynamic action updates the values in the three fields is - it does not set the value of session?  Why these fields don't are not taken into account in the submit other ideas > process Page?

    I use 5 APEX with Chrome on Mac (Yosemite).

    Thanks for the note.  I didn't only display the items could not be used in this way.  I think I'll take a different approach with the design; given that the org structure is in another table that I can simply refer to that by rep when necessary rather than saving the information uploaded to the page of the form.  The reason why I have not fill the screen only the points of loading the page is because I don't know what the values should be until the user selects a sales representative in the selection list.

    I'll change the design to one of the following:

    1) change the display only items of standard text field.  NOTE: if I make the text read-only field that causes other problems when loading (I get the message "violation of protection Session state").

    OR

    2) do not include org structure in the download folder and just refer to table org Rep when necessary.

    Thank you!

    Steve

  • How to use PL/SQL to create dynamic action to set the value of a selection by another list?

    Hello

    I would like to know how to use PL/SQL to create dynamic action to set the value of a list of selection by another selection list.

    1.PNG

    I wish can create dynamic action to manage the two above the Room select list (: P9_ROOM) and building (: P8_BUILDING).

    When you select "1074" in the bathroom, building highlights like "BRM BLD 5"

    When you select 'Area of the black box' in the room, building must assign the value "7 BLD BRM"

    When the room is Null, building should also be Null.

    I thank you,

    Alice

    I forgot to mention, for the PL/SQL Code, because you are working with items in the selection list, the return values are different from the display on your LOV values, you must instead use the return values.

    Thank you

    Erick

  • Level elements dynamic Actions and application

    Request Express 4.1.1.00.23


    I searched everywhere for an answer on this one and I can't seem to find it. Is it possible to have a dynamic action to interact with an element of application level? If it is possible, is able to have the value field in the when a dynamic action article contains a comparison operator?

    An example of a real case would be:


    Element level application F111X = X

    Dynamic action on P4_Item is triggered and disables the field

    Case of falsification:

    Element level application F111X = Y

    Dynamic action on P4_Item is not triggered and the field remains active.

    Thank you
    Jon

    Jon,

    I'm looking for an example, and if I use your article page P4 in the box 'When', event could be the change, Type of selection would be the page element.
    P4 would be selected in the drop-down list item (s), Condition would be equal to and value would be TEST with NO quotes!

    It is difficult for me to know when the values of the quote and when not.

    What is it?
    Howard

Maybe you are looking for