Condition of dynamic Action with and/or Expression Javascript

Hello

Anyone know if it is possible to have multiple values assessed in a Javascript Expression in dynamic Action?  For a DA on click of a button with status as a Javascript Expression, I want it to be worth...

$v ('P5_ITEM_1')! == « X » || $v ('P5_ITEM_2') is nothing

Therefore all true subsequent actions should be triggered when the P5_ITEM_1 is not equal to add or P5_ITEM_2 is null.  This does not work for me.  Only the first condition seems to be considered. The second seems to be ignored.  In other words, I can pass the two around and I have rated P5_ITEM_2 and the other ignored.

Thoughts?

-Seth.

If you would like to evaluate both conditions then have nested If statements or use and operator instead where operator

in one or the Organizer if the 1st condition is true then the whole expression must be set to true so that the rest are not evaluated

Kind regards

Vishal

Oracle APEX 4.2 reports | Packt Publishing

Vishal blog

Tags: Database

Similar Questions

  • Dynamic action with multiple values of PL/SQL Expression as a condition

    Hel

    I am currently using Apex 4.0 for a schoolproject.

    I have two selectlists (P8_BUSINESSRULETYPE - which has al businessruletypes) and (P8_OPERATOR) that has a select statement based on the businessruletype.

    I want to hide the selectlist operator when P8_BUSINESSRULETYPE = 7,8,9 and 10 or P8_OPERATOR = 9

    When: change

    SelectionType article (s)

    Elements P8_BUSINESSRULETYPE

    condition: equal to 10

    Real actions: hide items p8_operator

    False actions: show p8_operator items

    ConditionType PL/SQL EXPRESSION

    : P8_BUSINESSRULETYPE = 10 OR: P8_BUSINESSRULETYPE = 8 OR: P8_BUSINESSRULETYPE = 7 OR: P8_BUSINESSRULETYPE = 9

    What is the problem with my dynamic action? Because he does not hide the operatorfield when businessruletype 10 or 9 are selected in the selectlist. Sessions has also said operator = 9 and Businessruletype = 10

    I hope you guys can help out me.

    Thank you very much.

    2843640 wrote:

    Please update your forum profile with a real handle instead of '2843640 '.

    I am currently using Apex 4.0 for a schoolproject.

    I have two selectlists (P8_BUSINESSRULETYPE - which has al businessruletypes) and (P8_OPERATOR) that has a select statement based on the businessruletype.

    I want to hide the selectlist operator when P8_BUSINESSRULETYPE = 7,8,9 and 10 or P8_OPERATOR = 9

    When: change

    SelectionType article (s)

    Elements P8_BUSINESSRULETYPE

    condition: equal to 10

    Real actions: hide items p8_operator

    False actions: show p8_operator items

    ConditionType PL/SQL EXPRESSION

    : P8_BUSINESSRULETYPE = 10 OR: P8_BUSINESSRULETYPE = 8 OR: P8_BUSINESSRULETYPE = 7 OR: P8_BUSINESSRULETYPE = 9

    What is the problem with my dynamic action? Because he does not hide the operatorfield when businessruletype 10 or 9 are selected in the selectlist. Sessions has also said operator = 9 and Businessruletype = 10

    The first thing is that a Condition that is applied to a control of dynamic action if the dynamic action is made the see page. She has therefore no impact on the question of whether the actions of true or false are performed. 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.

    Secondly, this expression is not valid because it is a space between the colon and the identifiers. Link the names of rating, the colon and the variable element must be contiguous:

    :P8_BUSINESSRULETYPE = 10 OR :P8_BUSINESSRULETYPE = 8  OR :P8_BUSINESSRULETYPE = 7 OR :P8_BUSINESSRULETYPE = 9
    

    However the latter is only of academic interest, in this case you need to remove the condition of dynamic action.

    In the dynamic of change when action section, P8_BUSINESSRULETYPE, P8_OPERATOR, Condition of JavaScript Expressionand value to the value of the item (s)

       ($v('P8_BUSINESSRULETYPE') == '7')
    || ($v('P8_BUSINESSRULETYPE') == '8')
    || ($v('P8_BUSINESSRULETYPE') == '9')
    || ($v('P8_BUSINESSRULETYPE') == '10')
    || ($v('P8_OPERATOR') == '9')
    

    If you are using a browser that supported, this can be simplified to

       (['7', '8', '9', '10'].indexOf($v('P8_BUSINESSRULETYPE')) >= 0)
    || ($v('P8_OPERATOR') == '9')
    
  • 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.

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

  • dynamic action with checkboxes

    DB 11gxe and apex 4.0,

    Hi all

    I want to do,

    If the check box selected

    then

    do something; -set a value of another element, for example

    elsif unchecked

    then

    Delete the value of the item;

    end if;

    How to say (checked and unchecked) in the code?

    Newbi_egy

    Check out this demo

    On the left, the parameters of the dynamic action are listed.

    Use the condition equal to the checked valuevalue.

    Real actions are the action that will run when the check box is selected.

    The false actions will run if the check box is cleared.

    Nicolette

  • Dynamic action with refreshment area interactive report

    Hello!

    I use APEX 4.02

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

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

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


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

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

    See you soon
    Bottom

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

    Hello

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

    You can download and check the source

    Kind regards
    Jari

  • Use Dynamic Actions with pl/sql, calling a javascript alert function

    Hello

    I use Apex 4.0.1.00.03 with IE7.

    The problem I have is:

    I am converting an Oracle Forms application that has a lot of logic in it. In the application forms, it is a pl/sql function, based on a If/else condition call a popup alert box, which displays a warning message. He called pl/sql functions that return raising to the IF statement.

    Example of pl/sql code:

    If check_records() > 0 Then
    message to the alert box
    ElsIf TypeA_record then
    message to the alert box
    On the other
    message to the alert box
    End If;

    I need to replicate this functionality to the Apex 4. I tried to create dynamic Action on a page element, using a pl/sql function, however, when I call the popup javascript, this code not popup an alert box. I need the pl/sql to be run when the element of the page changes, not when the page is sent.

    The code I used to test the pl/sql code, which does not work in dynamic Actions > pl/sql is:

    Begin
    HTP.p ("< script type =" text/javascript"> '");
    HTP.p ("alert ("today runs javascript code!");"
    );
    HTP.p ("< /script >");
    End;

    I need to create a pl/sql function that can do alert areas based on an IF condition.

    Could someone point me in the right direction? Using dynamic shares the best way forward? I need to trigger on a page element, change the value.

    Works fine now.
    In the javascript code, I changed:

    get.addParam ('x 01', $v ('P105_PREP_TYPE'));

    by

    get.addParam ('x 01', $v ('P1_PREP_TYPE'));

    P1_PREP_TYPE is the correct name of the element.
    Now when I choose the OTHER, 1 message.

    Concerning

  • Dynamic action - Hide and show interactive report

    Hello

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

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

    Has anyone had similar experience?

    Greetings
    Michael

    Hello
    You are welcome.

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

  • Condition of dynamic action based on 2 points

    Three boxes A, B and C.

    I want has to be turned off when B or C is selected.

    Created 2 dynamic measurements for B and one for C.
    If B is true that a is disabled.
    If C is true that a is disabled.

    To activate the A I need to do the following:
    If B is not checked, and C has the value disabled, select A
    If C is not checked, and unchecked value b, select A

    The field of the status of the dynamic action does not seem to give me this option or does it?

    Create only one dynamic Action, trigger when you click box 1 or box 2

    Click on type:
    Nodes in the DOM: *,*.

    Action type' JS (_check run on onload too_)
    {code}
    If ($('#').is(':checked'): $('#').is(':checked'))))
    {
    $('#__').attr ('disabled', 'disabled');
    }

    If ($('#__').is ('not:checked') & $('#').is('not:checked'))))
    {
    $('#__').removeAttr ("disabled");
    }

    {code}

  • Update of dynamic Action with the text box

    This goes along with: update records with the text box

    APEX: 4.0.2

    THEME: SAND

    SERVER: Oracle-Application-Server-10g/10.1.3.1.0 Oracle-HTTP-Server

    I created an example with more comments on the page:

    workspace: stevendooley34

    username: dev01

    password: dev01

    application: examples of Forum

    page: update example

    I've implemented just as I think it should be put in place, but records only updates by clicking on my Refresh"" button.

    Keep in mind that the example is found in the apex 4.2.5 but I will implement this in 4.0.2.

    Thank you

    Steven



    Hi Steven,

    I think the main thing that was missing was adding the elements used in the PL/SQL "Page to go".

    The reason this is necessary is so APEX know what values of point on the browser should be sent (as part of the AJAX call) to the browser.

    IF you had all the elements that must be returned to the screen, then you will use the 'Page field items to return.

    I've also corrected a few things, P6 instead of P6 and P6_SEARCH_TYPE instead of SEARCH_TYPE, but they were just small "bugs" in the example.

    I also added another real action to refresh the report after the update.

    Thank you

    -Jorge

    PS. I do not validate that your code works for multiple, but the first glance entries and a quick test, it seems to work fine.  I focused only on the DA.

  • APEX 4.2.1 - error dynamic Action with SSP

    APEX 4.2.1 Oracle 11 GR 1 material

    Application of Protection enabled session state, all the elements necessary session level checksum, improved application from 3.x to 4.0 to 4.2 to 4.2.1

    Action DA code PL/SQL Execute with simply NULL; and Elements of the game Page as P13_REC_ID (the page element hidden with Protected = No and SSP = sum required - session level) will raise an error hopelessly obtuse popup box http://screencast.com/t/ndYWBsJmxJ

    Tried to reproduce the problem on apex.oracle.com. Exact same page, the same code, this time the error message is http://screencast.com/t/i0qOg9g0gb7 it makes much more sense. Change the SSP of the element of the Unrestricted setting page solves the problem

    The inevitable questions

    1. what security setting changed between 4.2.1 and earlier versions, which causes this security error? This is described in the release notes?
    2. more importantly, with the same software (APEX 4.2.1), why apex.oracle.com triggers a different, clearer than my instance error message?

    Thank you

    Hi Vikas,

    We really try not to break anything between versions, as we know how much it is important for our customers. Security patches should be given priority, however. We cannot use the compatibility mode for them, either, as apps would remain vulnerable by default. In this example, that is when otherwise protected items can be manipulated via AJAX, the agenda protection can be circumvented in general. This is one of the reasons why we added this audit Advisor that I already mentioned. I couldn't pinpoint the exact svn commit and bug # who introduced this change, it's just too much work to examine all the diffs.

    Regarding error messages, I discovered that it seems to depend on your web server. Apex.Oracle.com (WLS + earpiece of the Apex), ACCEPT and HTTP_ACCEPT headers are established. In mod_plsql, HTTP_ACCEPT is visible. The error handler checks ACCEPTED for json % and returns a json in this case response. Patrick just filed bug #16097364 for that matter.

    Kind regards
    Christian

  • How to forget the values of database in condition of dynamic action

    Hi all
    In my request for leave.
    Emp_name
    From_date
    To_date
    No_of_days
    Status
    I have two fields Date From_date and To_date in my form.
    I want to display the error if someone selected the From_date and To_date that has already been applied.
    For example,.
    If the employee employee already applied the leave.
    From_date: June 12, 2012 and To_date: June 15, 2012 and if it is stored in the database.

    If there still Ih tries to apply the dates between June 12, 2012 and June 15, 2012 I want to show the error message that are already applied in the selected dates, or alert

    For this, I tried action dynamic, is - it possible to the dates mentioned in a State of DA (in the list or not list) the dates of from_date and to_date the database?

    or what idea I can follow to verify this. ?
    Can someone give an idea?
    Thank you.

    Hello

    How can I insert the authorization information in your table? using process page?

    If this is the case, add a page-level validation. posting type must be 'function body of PL/SQl returning a Boolean.

    in the body of PL/SQL

    DECLARE
    
    ROW_COUNT NUMBER(1,0);
    
    BEGIN
    
    SELECT COUNT(*) INTO ROW_COUNT
    FROM TABLE_NAME
    WHERE FROM_DATE = :from_date AND TO_DATE = :to_date AND USER_NAME = :APP_USER;
    
    IF(ROW_COUNT >0)THEN
    RETURN FALSE;
    
    END IF;
    
    END;
    

    in the validation process, you can specify the error message to be displayed when validation fails.there you give the message that you want to.

    Published by: Apex-EPA on June 11, 2012 22:27

  • Is it possible to perform an action with a script using javascript cs6

    It is said in the pdf for the guide of script:

    "A script can perform an action, but action cannot run scripts.

    I can't find a way to do it, and I know a way to have an action to run a script so that the part is wrong haha. But if anyone knows how to have a script to perform an action, it would be very useful for me. Thanks in advance!

    Watch the doScript call which will play a defined action game action. Available for Apple, Visual Basic and from CS6, ExtendScript.

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

Maybe you are looking for

  • How to disable the new software alerts

    Every once in a while, I get a window pop up on my screen, announcing that the new software updates are available for my computer. My action options are limited - download all, remind me later, and one more. These alerts are a nuiscance for me. Is it

  • Satellite A60-S1591ST: yellow exclamation marks in Device Manager

    Hello Recently I formatted C: and installed XP Professional. But after installation, there are several problems. First of all, in Device Manager, there are large yellow markings at the SM BUS controller, video controller (VGA Compatible). How can I s

  • Lenovo Z570 - how to disable automatic brightness adjustment?

    It's driving me absolutely crazy! This only happens when I run the laptop out of the battery. And when I go to a website with a dark background, the display automatically dims down. Then when I'm on a brighter site, then screen lights back up again.

  • Seamless roaming with EA7500 + RE7000 the two AP work?

    I have a wired router provided by my ISP at home and a few wireless (wired connection to the router, DHCP off) covering the rooms. The experience of homelessness is terrible, and I am considering buying an EA7500 and a RE7000 to replace my existing A

  • Error code: 0 x 80240004

    Hello I get "error Code: 0 x 80240004" when I try to download an app on the store Windows (I use Windows 8), this is true for all applications. I tried to use a new account, but that it has not resolved, and neither do a clean reboot. I also disabled