Conditional Display on APEX region

Hello,
I need to validate following condition
Value of Item in Expression 1 = Expression 2
In above mentioned condition, I need to evaluate two different hidden item. P1_X and P2_X.
For e.g. when P1_X = 0 and P2_X = 1
How can I accommodate above two items under same conditions for the same region?
I tried putting comma but seems it does not work.
For e.g.
Expression 1
P1_X, P2_X
Expression 2
0, 1
What is the correct way?
Thanks,
R

Hi,
You can use SQL exists condition and put the following query in expression 1
SELECT 1 FROM DUAL WHERE :P1_X = 0 AND :P2_X = 1Thanks,
Manish

Similar Messages

  • Conditional Display of A region based on a Search condition

    Hello All,
    I would really appreciate any suggestion and pointers on how to achieve the below.
    My requirement is to display a tabulated result based on a search condition.
    I have two regions. One region contains the items to enable a search and the other region will be used to display the search results.
    Region A is an HTML region containing three items
    1.     A text field: to enter the search text
    2.     A list field: to determine the type of entity to search (customer_id, invoice number, Passport No)
    3.     A button: to initiate the search process.
    Region B is a reports region displaying the search results
    My question is:
    1.     Is basing the source of the region as a “PL/SQL function returning a select statement” the ideal choice. I will have variable “WHERE” clauses based on the search criteria entered in region A. However, the columns returned will always be the same
    2.     How do we get the region B to display only when there are results returned from the search results
    3.     How do we base by result set based on a stored procedure in the database. Basically as an API. We pass in the parameters and the API passes the result set back to APEX. This way, I can have all the DML hidden behind the stored procedures
    Looking forward to your comments and suggestions
    Pravind

    Hello,
    See the below link
    Re: item dispaly conditionally
    Regards,
    Shijesh

  • Conditional display to the region

    Hi, I need to show or hide a region depending on the value of an item in another region. I try with the condition "value of item in expression1 = expression2 " and in the box of expression1
    :P29_ID
    in the expression2
    1
    And nothing happens, the region disappears and never shows again.
    Please, help me!

    Try using P29_ID in the field for expression 1 (without the colon).
    ~Dietmar.

  • How to use more than one region 'Conditional Display'

    Hi,
    I use a region and i want to use 2 Conditional Display for this region:
    . Fisrt when 'Request Is Contained within Expression 1' ==> 'Val1,Val2'
    . Second when 'Inline Validation Errors Displayed'
    Is it possible.
    Thanks

    Hi,
    The first one is relatively straightforward as there is a Condition Type available for that.
    The second one is a bit more complicated but can still be done. Have a look at Re: how to use wwv_flow.g_inline_validation_error_cnt? This will tell you how many validations failed. If there were any failures, you can set a hidden page item to 1, for example, and then use this page item in your condition
    Andy

  • How to handle Multiple Conditional Display

    I have a page (call it page 2) that one can navigate to using a column link from another page, or using a link from a list. On page 2 I have a region that I would like to conditionally display; display the region if they navigate using the list link, do not display if they navigate using the column link or if the page is in printer friendly mode. I can probably handle a multiple conditional display for a region using something like a PL/SQL Function Body returning boolean, is it possible to know which link was clicked?
    Other suggestions would be greatly appreciated.
    Regards
    Mark

    Sudheshna-
    In my List, I set REQUEST to P2_PARAM. On page 2, in the region where I want to control the display, for Conditional Type I chose PL/SQL Function Body returning boolean. In Expresion 1 I have this code;
    BEGIN
    IF V('REQUEST') = 'P2_PARAM' THEN
    RETURN TRUE;
    ELSE
    RETURN FALSE;
    END IF;
    END;
    The ELSE, handles the times I do not want to display the region, in my case if I linked to the page from a column on a page other than page 2, or if I want the page in printer friendly mode.
    Regards
    Mark

  • Conditional display in a SQL-Report/Report Region

    Hi,
    here I have an example for "Conditional display in a SQL-Report/Report Region". I figured it out in Firefox 3.6.2 using Firebug as development tool on Apex 3.2.1.00.12.
    First you have to put the following javascript code in the Page HTML-Header:
    <script type="text/javascript">
    <!--
    // SOURCE
    // W:\oracle\PRJ DWLS\javascript.07.js
    // Beispiel Funktion zur bedingten Formatierung einer Tabellenzelle.
    // Help (Substitution Strings):
    // http://htmldb.oracle.com/pls/otn/wwv_flow_help.show_help?p_lang=de&p_session=2412201185523196&p_flow_id=4003&p_step_id=420,4003
    // HTML Expression:
    // <script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#DFT_COND1#
    function ex_conditional_td
    ( p_id
    , p_rownum
    , p_cellnum
      var l_td;
      l_td = vd_getColumn(p_id, p_rownum, p_cellnum);
      // hier die Bedingung definieren
      if (true) {
        l_td.style.color = '#808080';
    }  // -- eof ex_conditional_td -- //
    // Beispiel Funktion zum Abstellen der onMouse Funktionalität der Tabellenzeile
    // HTML Expression:
    // <script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#DFT_ID#"
    function ex_conditional_tr
    ( p_id
    , p_rownum
      var l_tr;    // TABLE.TR
      var l_td;    // TABLE.TR.TD
      if (true) {
        l_tr = vd_getRow(p_id, p_rownum);
        l_tr.onmouseover = null;
        l_tr.onmouseout  = null;
        for (var i=0; i<l_tr.cells.length; i++) {
          l_td = l_tr.cells;
    l_td.style.backgroundColor = '#DDDDDD';
    } // -- eof ex_conditional_tr() -- //
    var g_DEBUG = false;
    var g_TBODY = null;
    // Liefert das Body-Element der Tabelle mit der ID <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // Return
    // das Body-Element oder NULL, wenn die Zeile nicht gefunden wurde
    function vd_getBody
    ( p_id
    if (g_TBODY == null) {
    var l_table = null;
    l_table = document.getElementById( p_id );
    if (l_table == null) {
    l_table = document.getElementByName( p_id );
    if (l_table != null) {
    if (vd_debug()) {
    alert("Tabelle gefunden, " + l_table.nodeName);
    g_TBODY = vd_search( l_table, 'TD', 't10data', 'TBODY');
    return g_TBODY;
    } // -- eof vd_getBody() -- //
    // Liefert die Zeile <p_rownum> der HTML-Tabelle mit der Id <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // p_rownum - die Zeilennummer
    // Return
    // die Zeile oder NULL, wenn die Zeile nicht gefunden wurde
    function vd_getRow
    ( p_id
    , p_rownum
    var l_body = vd_getBody(p_id);
    if ( l_body != null
    && l_body.nodeName == 'TBODY'
    && l_body.children[p_rownum].nodeName == 'TR') {
    return l_body.children[p_rownum];
    else {
    return null;
    } // -- eof vd_getRow() -- //
    // Liefert die Spalte <p_column> der Zeile <p_rownum> der HTML-Tabelle mit der
    // Id <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // p_rownum - die Zeilennummer
    // p_column - der Index der Spalte / Zelle
    // Return
    // die Zelle oder NULL, wenn die Zelle nicht gefunden wurde
    function vd_getColumn
    ( p_id
    , p_rownum
    , p_column
    var l_tr = vd_getRow(p_id, p_rownum);
    if ( l_tr != null
    && l_tr.nodeName == 'TR'
    && l_tr.children.length >= p_column
    && l_tr.children[p_column].nodeName == 'TD') {
    return l_tr.children[p_column];
    else {
    return null;
    } // -- eof vd_getColumn() -- //
    // Rekursives Suchen nach einem Node.
    // Zweck: Das bedingte Formatieren einer Tabellenzelle in einem Apex Standard
    // SQL-Report.
    // Diese Funktion durchsucht rekursiv, ab einem Ausgangsknoten <p_node>, alle
    // darunter befindlichen Elemente, ob in dem Element <p_seachIn> sich die
    // Klasse <p_class> befindet.
    // Bei Standard-Reports ist die Reportzelle (TD) mit der Klasse
    // "t10data" formatiert.
    // Zunächst muss dazu die Tabellenzelle (TD) selbst, die übergeordnete
    // Tabellenzeile (TR), der Tabellenbody (TBODY) oder die Tabelle (TABLE)
    // selbst ermittelt werden.
    // Der Beispielaufruf:
    // var l_body;
    // var l_node = document.getElementById( 'R112233' );
    // l_body = search( l_node, 'TD', 't10data', 'TBODY');
    // durchsucht also das mit der Id "R112233" versehene Element [der Report, für
    // den in Apex eine statischen ID vergeben werden musste] rekursiv, bis er
    // die [erste] Tabellenzelle "TD" findet, die als Klasse "t10data"
    // definiert hat. Für diese ermittelt er dann das übergeordnete TBODY-Element.
    // Parameter
    // p_node - das Ausgangselement
    // p_searchIn - der Knotenname, der durchsucht werden soll
    // [node.nodeName == p_searchIn]
    // p_class - der Name der CSS Klasse
    // [node.classList[<index>] == p_class
    // p_parentName - der Name [node.parentNode.nodeName == p_parentName]
    // des Elements, das zurückgeliefert werden soll. Wird als
    // p_parentName der Suchname p_searchIn angegeben, wird
    // das Element selbst zurückgegeben.
    // Return
    // das per p_parentName gesuchte Element (TD, TR, TBODY, TABLE)
    function vd_search
    ( p_node
    , p_searchIn
    , p_class
    , p_parentName
    var LN = "vd_search";
    var l_element = null;
    // DEBUG
    if (vd_debug()) {
    alert(LN + ":" + "Untersuche " + p_node.nodeName + ", id=" + p_node.id);
    // 1) der aktuelle Knoten ist der, der durchsucht werden soll
    if (p_node.nodeName == p_searchIn) {
    if (p_node.classList.length > 0) {
    for(var c=0; c<p_node.classList.length; c++) {
    if (p_node.classList[c] == p_class) {
    // Parent Node dynmisch suchen
    l_node = p_node;
    if (l_node.nodeName == p_parentName) {
    return l_node;
    while(l_node != null && l_node.parentNode != null) {
    if (l_node.parentNode.nodeName == p_parentName) {
    return l_node.parentNode;
    else {
    l_node = l_node.parentNode;
    // 2) wenn nicht 1) oder nicht in 1) gefunden, dann in den Kindelementen
    // weitersuchen
    if (p_node.children.length > 0) {
    var i = 0;
    while (i<p_node.children.length && l_element==null) {
    l_element = vd_search( p_node.children[i], p_searchIn, p_class, p_parentName);
    i++;
    return l_element;
    } // -- eof vd_search() -- //
    // Gibt an, ob Debug ein- (true) oder ausgeschaltet (false) ist.
    // Return
    // true - debug ist eingeschaltet
    // false - debug ist ausgeschaltet
    function vd_debug()
    return g_DEBUG;
    -->
    </script>
    Maybe you have to modify the "vd_getBody" function. I'm searching the table cell with having the class "t10data". When you use another theme, there's maybe another class used.
    Second is, that you set an static id for your report region. I prefer this structure:
    R<app-id><page-id><seq> (Raaaaappppsss) e.g. R094260001010.
    First example is to turn off the onMouse-Effect. Maybe on the first or last column definition you put this code in the "HTML-Expression" area:
    <script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#ID#This will call the example function ex_conditional_tr with the parameter
    a) the region id
    b) the rownum (as oracle always starts with 1 this is the first data row [rownum=0 is the table header row])
    Second example is the conditional formatting of a table cell. Put this in the HML-Expression area:
    <script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#ENAME#This will call the example function ex_conditional_tr with the parameter
    a) the region id
    b) the rownum
    c) the cellnum (here we have to subtract 1 to get the "real" cell index)
    The "ex_conditional" functions are just a representation of how to get the row or cell node.
    Hope this help a bit.
    Tom

    I would use a CASE statement in the select....
    each CASE would be an img src tag for a different button if the button is an image.
    does that make sense? I can include an example if you would like...

  • Conditional display of region with PL/SQL function returning SQL query

    Hello,
    ApEx 2.0.
    I use PL/SQL functions that return SQL queries to display the contents of a region.
    How could I conditionally display such region ? If no data is found, the region shouldn't be shown. I tried with "SQL query returns at least one row" but this doesn't seem to work.
    Thanks,
    Matthias

    Hi Matthias,
    Are the regions in question report regions? So your PL/SQL process is returning a SQL query and then populating a report?
    The EXISTS(SQL Query returns at least one row) condition should work, try running the query you are using in the Expression 1 textarea inside SQL*Plus, or SQL developer using the same parameters, and see what gets returned.
    If you are still stuck, can you post the query you are using inside your Expression 1 textarea of the Conditions section and I can take a look at it for you.
    Hope this helps,
    Cj

  • How to conditional display Report Region based on number of rows returned

    I have a page with two Report Regions.
    One Region should display if the Query returns 0-1000 rows. The other should display if the same Query returns more than 1000 rows.
    The only way I can figure out how to do this is have ANOTHER query in the conditions field for each Region to Select count(*) from etc.
    I know there is a #TOTAL_ROWS# value but that is only available after the Region is displayed. Is there some other built-in variable that can be used to put in the Conditions field or is doing duplicate SQL queries the only way?
    Any help would be appreciated.

    Rather than running your query 4 times (by embedding it in your condition), you can have a region that is not displayed, with a hidden item, and set the value of the item in a before header computation to the count of your query. Now you can conditionally display based upon the value of that item.
    -- Sharon

  • Conditionally Displaying Regions w/o Submitting Page

    I have a radiogroup with 6 choices in it. For each of these 6 choices exists a corresponding region, which I want to conditionally display upon choosing its corresponding choice in the radiogroup. The problem I'm having is that the only way I know how to do this is to make the radiogroup a radiogroup w/ submit, but I don't want to submit the entire page and its contents upon making a selection from the radiogroup, I just want to conditionally display specific regions and not submit the page until the submit button is clicked. It seems as though there should be an easy way to do this, is there?

    That's actually the first thing I tried too. The only problem with that is that with just a redirect, the item doesn't seem to store the value of the choice from the radiogroup, so there's no criteria there by which to set the conditional display.

  • Condition Displaying the region

    Hi All,
    I have two regions in one page, when I click the one of the column(hyperlink) in the first region(interactive report), it displays the second region(Report) based on the condition.
    My Condition is when the #status# = 'Pending' then only it should display the second region.
    if #status# = 'Issued' it should not show the second region.
    How can I achieve this, can anyone suggest how to satisfy this condition.
    Thanks,
    Suma.

    Hi Suma,
    I have same issue. Did you figure it out. If yes, then please post your solution here.
    Thanks,
    Raj

  • Data not submitting when I have a conditional display on a date field

    Hello all,
    Could someone please help me with the following issue?
    I have created an updateable report region with four updateable fields. 3 of the fields store a number values and the fourth stores a date value.
    Each updateable report item has a conditional display, and whether they are displayed or not is controlled by the end user using a radio group (with submit). This provides the user with three options.
    If I remove all conditional displays all data will commit to the database without any problems. If I apply the conditional display to the number fields only, again the data will commit as normal. However, as soon as I add a conditional display to the date field it all goes pair shaped. The data will then cease to commit, with no error message at all. Once I remove the conditional display normal service is resumed.
    I'm certainly an APEX novice at the moment, so I wondered if anyone could shed some light on this.
    Thanks in advance for your help
    Steve

    Stew,
    Basically, I have edited each applicable report field column attributes, via the report attributes tab, and selected a conditional display 'Value of item in Expression 1 = Expression 2' for all of them.
    In the same report region I have created a radiogoup with submit called p51_update_type, specifying three static return values; R, F and S
    Condition e.g.
    *"Expression 1"*
    p51_update_type
    *"Expression 2"*
    S
    All columns display as expected, and commits to the database are normal, that is until I apply a conditional display to the date field (which relates to a table column of type DATE in the database).
    Thanks
    Steve

  • Solution: Combining Multiple Conditional Displays Types

    Hi there,
    I am hoping that you will be able to assist me with a Conditional Display issue I'm encountering. I am using APEX 3.0.1.
    I have two regions on a page.
    Region 1 (HTML) merely contains Items and a Submit button.
    Region 2 (Reports) displays the output of a SQL query that includes the conditions based on the values in the Items (Dates To and From + Supplier from Select List).
    The Items have item level validation for NOT NULL and VALID DATE but when I enter an invalid date the Report displays an error message with the fact that there is an erroneous Item.
    I would like to utilise the No Inline Validation Errors Displayed seeded conditional but also include another condition where another Item > 0 (zero).
    I was hoping to use the PL/SQL Expression or PL/SQL Function Body Returning a Boolean types but need help with the syntax for defining the No Inline Validation Errors Displayed seeded condition in PL/SQL.
    Many thanks,
    Gary
    Message was edited by:
    GWilliams

    Thanks Scott, exactly what I was after.
    Solution:
    Made Conditional Display of type PL/SQL Expression and place the following statement(s) in Expression 1
    nvl(apex_application.g_inline_validation_error_cnt,0) = 0 AND :P55_SUPPLIERID > 0
    Regards,
    Gary

  • Dynamically hide/display multiple report regions.

    Hi,
    I need to build a dashboard like homepage for users with multiple report regions. Users should be able to pick the regions they want and the display point for those regions.
    Is this possible?
    Thanks in advance

    Hello Asha,
    I think the "where" part would have to come from CSS. If you visit http://apex.oracle.com/pls/otn/f?p=49882:3653 you can see a couple of HTML type regions which I placed using div tags and putting something like<div class="rpt_query" id="rpt_query">in the region Header and </div> in the region footer. You can accomplish the same with Report type regions and maybe any type of region.
    As for whether or not a region is shown, that can be done in the Conditional Display attributes. I do this by selecting "Value of Item in Expression 1 = Expression 2" as the Condition Type, a hidden page item as Expression 1, and a number (perhaps corresponding to check box as mentioned previously) as Expression 2. I'm actually using pseudo tabs and when a user clicks one of the tabs it changes the value of the hidden page item and submits the page to get the new region to show up.
    Hope this helps,
    Gregory

  • Conditional display based on row count

    I have a report region with sql query (PL/SQL function body returning sql query). In this region i have text item above the report. I would like to have a condition on this item that it should only show if there exists records in the report (row count > 0).
    How can this be done?
    Best regards
    Erik

    There are many options available for conditional display. You can use this one here:
    http://apex.oracle.com/pls/otn/f?p=31517:7
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Conditional Display

    Hi All,
    I am new to Apex and I have searched here for my scenario.
    I am using interactive reports region. My query is like this
    select name , nvl(amount,0) from projects;
    I am using nvl since I am using charts and otherwise chart wont work.
    Now in the report we dont want 0 to be appeared and instead we want it to be null.
    Could we use conditional display or we need a javascript ?
    Thank you
    Rajehs Alex

    Hello,
    For me a chart in an Interactive Report is working with null values?
    I tried with SELECT ename, sal FROM emp
    Does the above select also work for you?
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://www.apex-evangelists.com/
    -- http://www.apexblogs.info/

Maybe you are looking for

  • Setting or Resetting a password using SQL in Business One 9.0

    In the link shown below, we started a discussion on how to set a password using SQL in Business One. (I am re-opening the discussion in a new thread.) http://scn.sap.com/thread/3430860 I have been using a similar query to do the same. In the query be

  • Time Machine permissions problem!! Help!

    I have important data on my time machines backup and yesterday did a full reinstall of OSX after backing all my old stuff up on the time machine drive. Now time machine wont let me restore my data due to access privileges!! In the permissions it show

  • Small brush big size..Please help!!

    I' m using cs2. my brush is so tiny..it doesn't matter what brush size  i use.... I can't see my actual on sreen brush size I took caps lock off..still didn't work..I'm going crazy. Your help would be greatly appreciated!!

  • Finder Display

    When I have an application open in the finder, like Safari and I open a new one, like Word, the new application stays in the background instead of being in the "front" of the finder. This just started happening and not sure why. When I open a new app

  • Erasing hard drive to install data from old computer to mac mini

    I have a mini running OS 10.4 and I wish to erase all my data and replace it using Migration Assistant with all the data from my daughter's iMac. I have tried selecting the hard drive in Disk Utility but so far have only succeeded in clearing the fre