Oracle Apex conditional field display

Hi,
I have created two page wizard in Oracle Apex.
I have item and item_detail table. For item1, I have one detail record and for item2, I have two detail record.
On Step 1: Choose item which will be drop down from item table.
On Step 2: Based on item detail record count, I want to display text fields on step 2. If item1 is selected in step 1 thenl display, textdisplay1 and textfield1 in step2. If item2 is selected step ` will display textdisplay1, textfield1, textdisplay2, textfield2 in step2.
sql/pl/sql condition will be: select count(*) from item_detail where item_id in (select item_id from item where item_name='one provided in step 1'
I want this dynamic ability to display fields or atleast to hide textdisplay2,textfield2 based on sql/plsql condition.
Thanks,

984019,
How are you coming with this?
Since I'm a newbie, here's how I'd try to approach this.
1) So we have the Selection List, say, :P1_SList
2) Then I'd create a Dynamic Action (DA) triggered on a change to :P1_SList.
3) The DA would have a PL/SQL procedure in the DA that computed (:P1_Disaplay_Number) 1 for text1, 2 for text2, ...
4) Then I'd have a display Condition -- a PL/SQL Function Body Returning a Boolean -- on each item (text1, text2, ...), something like, say for text3, ...
BEGIN
          IF :P1_Display_Number <= 3 THEN
               RETURN TRUE;
           ELSE
               RETURN FALSE;
            END IF;
END;And so forth -- I hope my syntax is correct! So the item Condition determines whether the item displays.
5) You could set :P1_Display_Number to 0 initially, so no items display until the selection is made and the DA triggered.
(I hope you don't have more than 10-15 of these text1 ... text15.)
Is what I have described what you are trying to achieve?
Best regards,
Howard

Similar Messages

  • Apex conditional field in "SQL Query (updateable report)" region

    I have a multi-row region that displays values and allows entries in a number of fields. I should like the fields to be conditional in that they do not permit entry, but still display, if certain conditions apply (e.g. older rows greyed out). Can this be done?
    I have searched Google and this forum but all the threads I have found relate to field formatting or display/non-display.
    Many thanks in advance Dave Barber
    [Apex=4.1.1.00.23; Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production]
    Edited by: user13515136 on 03-Sep-2012 00:05

    >
    Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your profile with a real handle instead of "user13515136".
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
    I have a multi-row region that displays values and allows entries in a number of fields.Provide exact details of how this has been implemented. (An example on apex.oracle.com is always a good way to do this.)
    I should like the fields to be conditional in that they do not permit entry, but still display, if certain conditions apply (e.g. older rows greyed out). Can this be done? Almost anything can be done, often in multiple ways. Which are appropriate may be dependent on a particular implementation, the skills available to implement it, and the effort you're willing to expend on it. Hence it's necessary to provide full details of what you've done so far...

  • Find which tab is clicked in jQuery using Apex - Conditional Item Display

    Hi,
    I am using jQuery tabs in my apex page see code below:
    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/redmond/jquery-ui.css" type="text/css" />
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"> </script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"> </script>
    <script type="text/javascript">
    $(function() {
       $("#tabs").tabs();
       $x("tabs").appendChild( $x("tabs-1"));
       $x("tabs").appendChild( $x("tabs-2"));
    </script
    <div id="tabs">
    <ul>
    <li><a href="#tabs-1">Sample Tab1</a></li>
    <li><a href="#tabs-2">Sample Tab2</a></li>
    </ul>
    </div>I would like to display a button (example a button called sample2) at the bottom of a tabbed region Sample Tab2 based on a condition i.e. only if Sample Tab2 is clicked or in focus. Could someone please guide me on how i could implement this using a condition on the actual button "sample2"?
    Thanks and appreciate any kind of help!
    Cheers.

    Hi,
    Thanks for the information. I placed the following code on one of the page regions in my apex application:
    $("#tabs").tabs({
        select: function(event, ui){
          if(ui.index == 1){
           // do stuff here e.g. show button because Sample Tab2 is selected
            $('#CANCEL').hide();
          }else{
           // do stuff here e.g. hide button because Sample Tab2 is not selected 
            //alert("anothertext");
    });I am using the following code to hide the button upon click on the second tab within the page:
    $('#CANCEL').hide();I have a cancel button with the name "CANCEL".
    However, this is not working properly. I am new to Apex and jQuery could someone please guide me further with this?
    Thanks very much.
    Cheers.

  • Oracle apex select list display

    hi all:
    i have 2 select list ,1. select list1 and 2.select list 2 ok .in select list1 have items like A,B,C,D,E,F LIKE THAT AND select list2 aslo have item's like X,Y
    in select list1 i am trying to select B ..in select list2 it should be display only X..WHEN I am selecting other then B it's should be dispaly Y...ONLY....HOW WILL DO THIS GIVE ME SOLUTION .......

    You can do that using this example:
    http://htmldb.oracle.com/pls/otn/f?p=31517:119
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to hide text field item based on true or false cases in oracle apex

    Hi,
    I have a set of text Field items in oracle apex:
    Order Number
    Revision Number
    When we open the report, revision should be hidden.
    Only when the user enters unique order number (non-duplicate order numbers), revision number should be visible.
    If he enters duplicate order number, revision number should be hidden.
    Please help.

    Hi 2932464,
    2932464 wrote:
    Hi,
    I have a set of text Field items in oracle apex:
    Order Number
    Revision Number
    When we open the report, revision should be hidden.
    Only when the user enters unique order number (non-duplicate order numbers), revision number should be visible.
    If he enters duplicate order number, revision number should be hidden.
    Please help.
    Giving you example how to achieve this.
    Step 1. Create three Page Items
        1) P1_ORDER_NO - Text Field
        2) P1_REVISION_NO - Text Field
        3) P1_ENABLE_DISABLE_REVNO  - Hidden,Value Protected - No
    2. Create 3 Dynamic Actions
    1) Disable revision number on page load
        Event - Page Load
        Action - Disable
        Fire When Event Result Is  - True
        Selection Type - Item
        Item - P1_REVISION_NO
      2) Check duplicate order number
        Event - Change
        Selection Type - Item(s)
        Item(s) - P1_ORDER_NO
        Condition - is not null
        Action - Execute PL/SQL Code
        Generate opposite false action - Unchecked
        Fire When Event Result Is  - True
        Fire on page load - Unchecked
        Stop Execution On Error - Checked
        Wait for Result - Checked
        PL/SQL Code -
    declare
    l_count number;
    begin
      select count(*) into l_count
        from emp
       where empno = :P1_ORDER_NO;
    if l_count > 0 then
      :P1_ENABLE_DISABLE_REVNO := 1;
    else
      :P1_ENABLE_DISABLE_REVNO := 0;
    end if;
    end;
    Page Items to Submit = P1_ORDER_NO
    Page Items to Return  = P1_ENABLE_DISABLE_REVNO
    3 ) Enable and Disable Revision Number
        Event - Change
        Selection Type - Item(s)
        Item(s) - P1_ENABLE_DISABLE_REVNO
       condition - greater than or equal to
       value  - 1
       Action - Disable
       Fire on Page Laod - Unchecked
       Generate opposite false action - checked
       Selection Type = Item(s)
       Item(s) - P1_REVISION_NO
    Hope this helps you,
    Regards,
    Jitendra
    DER_NO

  • Apply "WHERE CONDITION" in "MASTER/DETAIL FORM" in "ORACLE APEX

    Hi to all respected Gurus of this community.
    I have a problem and I hope that there must be solution in this community and I am not aware of that till now.
    I have a master/detail form in Oracle Application Express. Now, I want to apply a where condition in master-form to filter the data as per requirement but I cannot do so.
    There is an option of "Modify Query" in "Query Definition". According to the instructions I am selecting the desired column (HR_Category) in left and providing text string 'M-9' in the right column to filter the data where HR_Category is M-9, and when I press apply changes, it gives me an error that
    "1 error has occurred
       The condition you are adding has caused the query to be invalid."
    Please help how to proceed to apply a where condition.
    Regards
    Muhammad Uzair Awan
    Oracle APEX Programmer
    Pakistan

    uzairmalik wrote:
    Hi to all respected Gurus of this community.
    I have a problem and I hope that there must be solution in this community and I am not aware of that till now.
    I have a master/detail form in Oracle Application Express. Now, I want to apply a where condition in master-form to filter the data as per requirement but I cannot do so.
    There is an option of "Modify Query" in "Query Definition". According to the instructions I am selecting the desired column (HR_Category) in left and providing text string 'M-9' in the right column to filter the data where HR_Category is M-9, and when I press apply changes, it gives me an error that
    "1 error has occurred
       The condition you are adding has caused the query to be invalid."
    Please help how to proceed to apply a where condition.
    Regards
    Muhammad Uzair Awan
    Oracle APEX Programmer
    Pakistan
    Probably a syntax error.  Check the syntax of the new clause very carefully.
    Can you post the query indicating which predicate is the new one?  If you need to change the column and table names for confidentiality

  • Conditionally Hide/Display fields in a region

    How can I conditionally hide/display fields in a region. Based on a user selection whether they want to 'Enter' or 'Select', I want to dispaly the appropriate field .i.e. if the user selects 'Enter' then I want to display a Text field and if they opt for 'Select', then I want to display a Select list.
    Thanks in Advance.
    Regards,
    Hilal

    Hi Halil,
    I've been trying to reproduce what the linked site does.
    Here's my solution:
    1 - Add all items to the page whether or not they are going to be displayed
    2 - Ensure that all items that could be shown/hidden are on lines on their own (ie, set New Line to Yes)
    3 - In the region's Region Footer (or in a new HTML region in the Before Footer position), add in this bit of javascript:
    &lt;script type="text/javascript"&gt;
    html_HideItemRow('NameOfFieldToHide');
    -- repeat for each item to be hidden when the page first loads
    &lt;/script&gt;
    4 - On the radio button's definition, add the following in the HTML Form Element Attributes setting:
    onclick="html_ToggleItemRow('NameOfDisplayedItem');html_ToggleItemRow('NameOfHiddenItem');"
    Now when the page is loaded, one field is automatically hidden then clicking any of the radio button options will toggle the hidden/displayed fields and their labels.
    As stated before, if you do a View Source on the linked application's page, you will see either more methods that are used to show/hide items/regions, but the above should be a starting point for you.
    Regards
    Andy

  • How to display flash controlbar while playing videos on Oracle Apex 3.2.1?

    Hi,
    I´m developing an APEX application that displays Flash videos on a html page.
    I could display the video, but without the flash control bar (PLAY, STOP, PAUSE, SOUND VOLUM, etc).
    I´ve created an HTML region on a page with de following code:
    <body>
    <embed      src="#WORKSPACE_IMAGES#lixao.swf" width="440" height="280" controller="true" align="middle" quality="high" loop="false" name="player" hidden="false" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash"
    controller="true"
    pluginspage="http://www.macromedia.com/go/getflashplayer/">
    </body>
    Could someone help me and explain what´s wrong with the code above?
    Best regards,
    Sergio Coutinho

    Couple things here..
    Please change forum name to something more friendly..
    Please when posting, include such information as database version, APEX version
    Also, I do NOT believe you need to include the <body> tag when building your region....
    Modify this with your required paths and file names:
    <object clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload. macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,16,0"
    width="400" height="200" id="stage1" align="" >
    <param name=movie value="stage1.swf"><param name=quality value=high>
    <embed src="/i/flash/stage1.swf?clickTAG=f?p=&APP_ID.:9:&SESSION.::NO::" quality=high width="400" height="200" name="stage1" align=""
    type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
    </embed></object>
    {code}
    Thank you,
    Tony Miller
    Webster, TX
    While it is true that technology waits for no man; stupidity will always stop to take on new passengers.
    If this question is answered, please mark the thread as closed and assign points where earned..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Two conditions for an list item entry in oracle APEX 3.2

    Hello,
    Can anyone please help me with this issue.
    I have list item with 3 entries. And i want one of the entry item to be displayed on the page 7 and also satisfy the below pl/sql function.
    begin
    if (NVL(:P0_Datastore,'%'||'null%') != '%'||'null%' AND NVL(:P0_schema,'%'||'null%') != '%'||'null%' AND
    NVL(:P0_Table,'%'||'null%') != '%'||'null%') AND
    :P5_COUNT != 0
    then
    return TRUE;
    else
    return FALSE;
    end if;
    end;So how can i modify the function to include the condition to display the item entry on page 7 only.
    thanks,
    Orton

    hello,
    I was able to resolve the issue. By changing the function code to
    begin
    if (NVL(:P0_Datastore,'%'||'null%') != '%'||'null%' AND NVL(:P0_schema,'%'||'null%') != '%'||'null%' AND
    NVL(:P0_Table,'%'||'null%') != '%'||'null%') AND
    :P5_COUNT != 0 AND :APP_PAGE_ID = 7
    then
    return TRUE;
    else
    return FALSE;
    end if;
    end;thanks,
    Orton

  • Disable form item in oracle apex 3.2

    Hi,
    I am new to oracle apex, please help me from this problem.
    I'm having form item called "P805_COMP_ID" as text field , i need disable it always, for the same i fallowed some steps with the refrence of the link https://forums.oracle.com/forums/thread.jspa?threadID=2309731
    Step 1 i have written the jquery
    *<script type="text/javascript">*
    *$(document).ready(function(){*
    hideAdvsearch();
    function DisableItems()
    *$x_disableItem('P805_COMP_ID',true);*
    *</script>*
    Step2 : and i'm calling same function in HTML Form Element Attributes
    onload="DisableItems();"
    but it is not working, please help me,
    Thanks and regards,
    Ibrahim Sayyed.

    Hi Hari,
    I am sory to late respond ,
    The above scenario is working fine , after calling same function in header and footer atribute.
    but it is not working properly if i put condition.
    as per below mentioned code if item value 'P802_INT_COMP_ID' is null then it should disable else it should enable.
    <script language="JavaScript" type="text/javascript">
    $(document).ready(function(){
    hideAdvsearch();
    DisableItems();
    Function DisableItems()
    if ($v('P802_INT_COMP_ID').val== null)
    $x('P802_TEMP_LOG').disabled = true;
    </script>
    Thanks and regards,
    Ibrahim Sayyed.

  • Oracle APEX Plugin Development in v4.2.2

    I was wondering if people could please assist with Oracle APEX Plugin development and whether the following requirement is possible and if so, would appreciate the type of coding behind it.
    I basically would like to be able, via a plugin, create a form with say six page items, where two of those page items might be LOVs, another two are page items are text fields, where users have to enter values and the remaining two are display items only.
    Based on this form requirement, I want to be able to upload/install this plugin within other Oracle Application Express apps/schemas, so when installed within other apps, this plugin is rendered within a region and the data is stored within a table in that schema, but using the form described above.
    Can this be achieved building a plugin in Oracle APEX and if so, any pointers on how, would be much appreciated.
    Thanks.
    Tony.

    This was a known issue with 4.2.3, and I believe is rectified in 4.2.4
    Oracle Application Express 4.2.3 - Known Issues

  • Oracle apex and extjs grid table

    hi
    im new to extjs and i was wondering if someone can help me with this;
    i want to create a report in oracle apex and put the output in extjs grid table
    for example i want to view the output of select * from all_objects in grid table
    thnx in advance

    Okay
    To get you started...
    Create a new report template with named rows.
    In row 1 template put this
    ["#1#","#2#","#3#","#4#","#5#","#6#","#7#","#8#"]Assuming you have 8 rows say... and make it conditional based on a PL/SQL Expression like this
    #ROWNUM# = 1Then row 2 template like this
    ,["#1#","#2#","#3#","#4#","#5#","#6#","#7#","#8#"]Conditional on
    #ROWNUM# > 1Then in before row put this
    <script type="text/javascript">
    Ext.onReady(function(){
    var munkyData = [And after rows something like this (based on the emp table)
    var store = new Ext.data.SimpleStore({
          fields: [
                   {name: 'empno', mapping: '0'},
                   {name: 'ename', mapping: '1'},
                   {name: 'job', mapping: '2'},
                   {name: 'mgr', mapping: '3'},
                   {name: 'hiredate', mapping: '4'},
                   {name: 'sal', mapping: '5'},
                   {name: 'comm', mapping: '6'},
                   {name: 'deptno', mapping: '7'}
    store.loadData(munkyData);
    var grid = new Ext.grid.GridPanel({
           store: store,
           columns: [
                     {id:'empno',header: "Employee",sortable:true, width:100,dataIndex:'empno'},
                     {header: "Name", sortable:true,width:75, dataIndex:'ename'},
                     {header: "Job", sortable:true, dataIndex:'job'},
                     {header: "Manager", sortable:true,width:75, dataIndex:'mgr'},
                     {header: "Hire Date", sortable:true,dataIndex:'hiredate'},
                     {header: "Salary", sortable:true,width:50,dataIndex:'sal'},
                     {header: "Commission", sortable:true,dataIndex:'comm'},
                     {header: "Department", dataIndex:'deptno'}
           stripeRows: true,
           width:700,
           autoHeight:true,
           title:'Array Grid',
           renderTo: 'munkyDiv'
    </script>Then create a region to hold it with a source of
    <div id="munkyDiv>
    </div>
    {code}
    This is pretty basic but it should get you going...
    Cheers
    Ben
    http://www.munkyben.wordpress.com
    +Don't forget to mark replies helpful or correct+ ;)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Can we get multiple graphs dynamically in oracle apex?

    Can we get multiple graphs dynamically in a page in oracle apex?

    Vaishalini wrote:
    Thank You riedelme and Howard.
    Below is the example, I need to dynamically displays graphs with content (somewhat) dynamically selected for client from the select list.
    Example :-
    Lets say client A contains 5 contracts as A1, A2, A3, A4, A5.
    And Client B contains 3 contracts as B1 ,B2, B3.
    created a graph for contracts on sum(unique_submissions) and sum(total_submissions).
    Requirement is :-
    When I select Client A , then the page should show 5 individual graphs based on client A contracts in same page(as client A has 5 contracts).
    Similarly when select client B , the same page should show 3 graphs (as client B has 3 contracts).
    Please let me know if you understood the example, what I was trying to explain to you (I hope)and let me know if you need further more information.
    Thanks.It sounds like you need to use Howard's idea of conditional region display. When you select client A display client A graphs, and when you select client B display those graphs. Read about conditional region display in the documentation and post back here if you have more questions

  • How fetch data from a view(which is located in different server) using Oracle APEX webservices

    Hi,
    I have a requirement to fetch the view data from client instance(which is different server) to another instance lets say Development instance
    Requirement:
    Need to get the Apps View data from the Desired EBS instance(which is accessible online) using webservices,and display it in the Oracle Apex Development Instance.
    Kindly provide your inputs how to achieve this.
    Thanks in advance
    keerty

    Are you getting an error? The way you have it set up, you can have an error and it will never be displayed. Put and error control on your front panel and see what it gives you. Also, shared variables in a project can be useful. Look at some examples for that.

  • Getting error while importing the application in Oracle Apex

    Hi,
    I am facing an issue while importing an application into my new Oracle Apex installation. Installation was successful with out any issue. I exported an application from my old Apex (version 3.0.0.00.20) and importing the same into new apex (version 3.0.1.00.08). I am getting the following error.
    ============================================================
    The requested URL /pls/apex/wwv_flow.accept was not found on this server.
    ============================================================
    When I click on import in Application Builder page and then browse the required file it gives the progress saying "Importing File" and after some time it displays the above error.
    I tried bouncing the application also and there is not error in alert log.
    Could any one please suggest, if there is some problem here. Or my approach is not correct.
    Thanks in advance.
    Regards,
    Advait Deo

    Osacar, I recommend that you try to import the application into your workspace on apex.oracle.com and see what happens. Also, refine the problem statement as much as you can, e.g., you get this error importing "the application" or when importing "any" application. How big is the file you're trying to import? Where did it come from? Can you upload images?
    Scott

Maybe you are looking for

  • Is there pakages you can buy for itunes like 20 songs for $10

    Was wondering if there were packge deal you can buy here instead of buying .99 a song

  • Importing miniDV files losslessly

    Hi, I have an old Sony TCR-TRV11 Camcorder that uses miniDV cassettes for recording video. I have recently imported all of them thorugh firewire 800 via iMovie '11 as .dv files into the iMovie Events folder. Is there a way to convert those .dv files

  • Best setting for Canon VIXIA HF R21 for YouTube

    I am looking for the best or most optimal setting for shooting video with my Canon VIXIA HF R21 camera. I am using a MacBook Pro laptop and Adobe Premiere Elements 10. My goal is to produce the best quality videos for a "YouTube" channel. The videos

  • Download PDF file stated (SECURE). How to remove?

    I have downloaded my bank statement and saved it to my computer. The file name has the word (SECURED). I can open the the saved statement without a problem. But since the statement is saved to my computer, I would like password protect the statement

  • Layer 2 trunk ports went down due to cisco 4500 core switch !!!

    Hi Everyone, My 2 Layer 2 2960 switchTrunk Ports went down due to cisco 4500 switch. It happening everytime . I rebbot the switch 4500 . then problem disappears but after sometime facing same issue. Please help.