Conditional Display - ideas needed

Hello
I have this:
http://vels.dk/tmp/display.jpg
I would like to show only "Choice invoices view" region when the user come to the page.
When the user press the "Show All" or "Last x days" then I have a 2 Branches. The Branches set a hidden item to 0 or 1 (1= all 0= last x days)
The user surf to another page in the application and come back to the page. But now the "Invoice" region is display... How do I solve this? I have tryed some REQUEST, but the "next row select" belov the table has no REQUEST functions :(
Some ideas?
Best Regrads
Jesper Vels

Hi Jesper,
I would suggest something like the following:
1 - Your hidden field should have THREE values - 0=Hide, 1=All and 2=Last x days
2 - The default value should be 0
3 - Have a conditional display on the report's region that only displays the report is the value of the hidden item is not 0
4 - Your two buttons can then set the value of the hidden field to 1 or 2 and the SQL statement should include a WHERE clause something like:
WHERE ((:P1_SHOW = 1 AND ....)
OR (:P1_SHOW = 2 AND ...))
5 - Create an application computation for the hidden item
6 - This should set the value to 0 when the current page is NOT this page - therefore, whenever the user moves to any other page, the value will be set to 0 and the report will be hidden
Regards
Andy

Similar Messages

  • Conditional displays, examples needed

    Hi,
    I wud appreciate some help on conditional displays to be used. e.g. depending on a value returned by a query like
    "select count(*) from table" greater than "X" a button shall not be displayed.
    Furthermore it wud be helpful to receive an example on each of the expression combinations. Its difficult to read the ideas behind the functions without documentation considering, that also some less experienced programmers wud like to make use of these marvelous functionalies on declarative means. Suggest to integrate this in the next documentation/help or in a How To Document !
    TIA - Bernhard

    thanks for the documentation suggestion, i've noted it. re your number of rows condition, i'd probably implement it as a "PL/SQL Function Body Returning a Boolean" with expression 1 being something like...
    declare
    l_cnt number := 0;
    begin
    select count(1) into l_cnt from emp;
    if l_cnt > 13 then
    return false;
    else
    return true;
    end if;
    end;
    ...and if you'd computed that "select count(1) from emp" value ahead of time into an htmldb Item, you could us it in a condition of type pl/sql where Expression 1 could be...
    :MY_COMPUTED_ROW_COUNT_ITEM <= 13
    ...and in both cases the button wouldn't show if there were more than 13 rows in emp.
    hope this helps,
    raj

  • Need help with conditional display

    I found a older thread (704012) that explains how to conditionally display a link using style.  Which is what I want to do.  The part I'm having trouble with is that part of the instructions say to put
    class="row_has_values_#HAS_VALUES#"
    in the Link Attributes which I have done.  I also have a column in the report called HAS_VALUES and I'm properly populating it in my select.  I know because I left it displayed while I'm testing.  I can run the report and I have Y's and N's showing up in that column but the conditional part does not work.  When I look at the page source (below) I see that in the html the #HAS_VALUES# has not been replaced by the actual Y or N.  I think that's where I'm having trouble?  I think it might work if there was a Y or N in that but I don't understand why that didn't happen.
    <tr class="odd"><td headers="LINK"><a href="f?p=125:3:12628966088981::NO::P3_PROGRAM_KEY:2" class="row_has_values_#HAS_VALUES#"><img src="/i/e2.gif"  border="0"></a></td><td  align="left"

    LawrenceJ wrote:
    I've continued to snoop around and see lots of posts on conditional display in reports.  Common desire I guess.  I saw some stuff that I interpreted to suggest that what I'm trying to do may not work in interactive reports, only in classic reports.  Does that sound familiar?
    That would certainly apply to anything template-related. However there have been enhancements to IRs (like adding HTML Expressions) that might supersede information in older posts. If you provide a link to the sources you've found and the APEX version you're using someone will be able to confirm whether that information is relevant.
    Many other posts on doing things conditionally in reports seemed to lean towards "selecting" the html based on data values and then just letting that get put in the report column.  That looks promising but sure is a bit ugly.  I've very little apex experience but lots of mod pl/sql and that sort of solution was pretty common when I did stuff with it.  I saw a little suggesting using templates as a solution but I'll confess to not understanding it at all.
    As I pointed out in the original thread, if the conditional display of the link is in any way security related then CSS or JS/jQuery methods are not acceptable. If the user is not supposed to be able to click the link or see any data contained in it, then you have to use a method that ensures that the link element never reaches the browser.
    Hard-coding the link HTML in the report query is the common approach, but is as you say a bit ugly. Using a custom report template (my favourite APEX subject) enables clean separation of the report query, conditional logic and HTML structure. If you know HTML then you're advised to get familiar with using templates in APEX. You'll find this a major advance on the PL/SQL web toolkit. What is it that you're not understanding about using templates?

  • Application Level Function for Conditional Display

    I need to hide a field on Print Preview if it is null. I currently have the following PL/SQL Expression Condition:
    :P305_DEPT IS NOT NULL AND v('PRINTER_FRIENDLY') <> 'YES'
    It works great; now I need to do this for a lot more fields within my application. Is there a way to call a PL/SQL process defined in HTML DB, passing it the current item value, or some other way to save myself some typing?
    I've tried various combinations of shortcuts, substitution strings, application processes, etc. and can't seem to get the right combination.
    I'm hoping you have a cool solution, or some other ideas I can try out.
    Thanks!
    Chaunaci

    Hi Raj,
    All of this came up because we have several data items displayed above each report page, which allow the user to enter filter criteria. When the page is displayed in Print Friendly mode, the Select Lists display as blanks when null, but Text Boxes display as [] when null.
    Our QAs have asked us to make all of the filter fields consistent in appearance in Print Friendly mode. The work-around solution is to hide the filter fields that are null when in Print Friendly mode. Therefore, we came up with the following PL/SQL Expression to use in the Conditional Display:
    :P305_DEPT IS NOT NULL AND v('PRINTER_FRIENDLY') <> 'YES'
    Because I will need to add the above conditional statement to many items, I was hoping to create and call an HTML DB application-level process and pass the current item value in, so my conditional display logic would look something like...
    HIDE_NULL_ON_PRINT(:P305_DEPT).
    When I was doing some additional testing last night, I realized my boolean logic needed to be tweaked, and it would be nice to tweak it in just one place, rather than on every field's conditional display.
    I currently have it working by putting the IS NOT NULL AND v('PRINTER_FRIENDLY') <> 'YES' into an application substitution string, so my conditional logic shows as:
    :P305_DEPT &HIDE_NULL_FOR_PRINT.
    In trying to determine if this was the best solution, I need answers to the following issues:
    1. Is there a way to generically reference the current item in the conditional display logic? I currently type in the specific item name (ex: :P305_DEPT), but it would be nice if instead I could just say &CURRENT_ITEM_NAME. (or something similar).
    2. Can I create an application-level process, pass a parameter into it (the current item), and have it return a value that can be evaluated by my conditional logic display?
    Thanks so much for your quick responses to this and all my previous posts. It is wonderful to be able to post a problem at the end of the day, and come in to a solution in the morning!
    Chaunaci

  • Conditional display of list box in form (depends on other report column)

    Hello,
    i have one question regarding conditional display in forms.
    I have a tabular form where only one column ("flag") is updateable, all other columns are visible only.
    I changed the column "flag" from "standard report column" to "Select list (static lov)", which has the values "yes" and "no".
    This works fine. But in the running form i want to display the list box only if the column "status" = 'ERROR'.
    The column "status" can have the values 'ERROR' and 'OK'.
    When one record has "status" = 'OK', the column "flag" should not display the list box (only empty column row),
    when one record has "status" = 'ERROR" the column "flag" should display the list box.
    The idea behind is that if a record has "status" = 'ERROR' i have the possibility to confirm that "error" and update the column "flag" with "YES". This should only be possible for errors.
    This is my main problem.
    I tried with conditional display, but this hides or shows the column for the whole report/form, not on record level...
    The second problem then is, that if the column "flag" is changed to "YES" in case of column "status" = 'ERROR', then it should not be possible to change it again to 'NO". At the beginning it is 'NO', but once changed to 'YES' it should not be changeable any more.
    Is this possible?
    Thank you in advance,
    Matthias

    Hello Mike
    your solution sounds good, but unfortunately it is not working.
    None of my 2 columns are displayed, although i tried it as you wrote and the conditions should match...
    But i am no sure if this can work. If so, the 2 columns must fuse to 1 column:
    ID STATUS FLAG
    1 ERROR yes/no => comes from column1
    2 OK (null => comes from column2
    so "FLAG" must display column1 and column2 in one column. is that possible?
    regards,
    Matthias

  • Conditional display using Pl/SQL function body returning a boolean

    I am having issues with conditional display of a report.
    I have to select lists: p50_facility and p50_supervisor.
    I have entered the below pl/sql function body returning a boolean
    Begin
    if (:p50_facility is null or
    :p50_supervisor is null) THEN
    Return False;
    Else
    Return True;
    End if;
    End;
    No matter what values my items are set to (null, not null), the report shows.
    What am I doing wrong?

    Hi,
    The values for the lists will be null only until the first time the page is submitted. Thereafter, the value is likely to be '%null%'
    You will need to do something like:
    BEGIN
    IF (:P50_FACILITY IS NULL OR :P50_FACILITY = '%' || 'null%' OR :P50_SUPERVISOR IS NULL OR :P50_SUPERVISOR = '%' || 'null%') THEN
      RETURN FALSE;
    ELSE
      RETURN TRUE;
    END IF;
    END;Andy

  • 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

  • Conditional Display of Interactive Report Based on Field Above

    Page one has simple text box entry for a Vendor # with a button that branches to a page displaying information for that vendor. In a region below, I would like an interactive report that displays all of the item and description that vendor provides to our company. I have tried to use the Conditional Display to disply only items in the report but have been unsuccessful. Your help is appreciated!
    Thanks.

    Hello user2961006 (please tell us your name),
    I understand your question to be, "how do I make a report on page two only show rows related to an item entered on page one". Putting a condition on a region isn't the answer here - you want the report to always display, but just with different rows depending on the vendor number entered. A condition on a region is used to either display the region or not.
    What you need to do is put a WHERE clause on the SELECT statement that your report is using to get its data. For example, if the item holding the entered vendor number is P1_VENDOR_NUM, the SELECT statement for your report would look something like:
    SELECT item, description
      FROM my_items
    WHERE vendor_num = :P1_VENDOR_NUMNote my_items is a fictitious name. This will tell the DB to only retrieve rows where the vendor number is the vendor number entered by the user.
    Hope this helps, I'll gladly accept reward points if it does ;-)
    John

  • Conditional display of modal popup window?

    Hi,
    I'm currently implementing a file-upload in Apex 4.1. The workflow I envision is this:
    *User selects the file and initiates upload
    *The file is checked by some pl/sql code.
    *Under certain conditions the user is asked if she wants to continue.
    *The data is processed.
    For the conditional user-dialog I wanted to use a modal popup window as described in http://shijesh.wordpress.com/2010/04/10/jquery-modal-form-in-apex-4/ and other places.
    But how can I conditionally display this dialog dependent on the result of the file-check? I would need to call a java-script function from pl/sql - but how can this be achieved?
    Any hints or examples?
    Many thanks & kind regards,
    stephan

    steph0h wrote:
    Hi,
    I'm currently implementing a file-upload in Apex 4.1. The workflow I envision is this:
    *User selects the file and initiates upload
    *The file is checked by some pl/sql code.
    *Under certain conditions the user is asked if she wants to continue.
    *The data is processed.
    For the conditional user-dialog I wanted to use a modal popup window as described in http://shijesh.wordpress.com/2010/04/10/jquery-modal-form-in-apex-4/ and other places.
    But how can I conditionally display this dialog dependent on the result of the file-check? I would need to call a java-script function from pl/sql - but how can this be achieved?
    Any hints or examples?
    Many thanks & kind regards,
    stephanI don't think you would call the java-script function from PL/SQL as much as (maybe) use PL/SQL to write it - embed the Javascript code in the generated HTML of the page. Another option would be to put the JavaScript code as page or item attributes to be executed at run-time

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

  • Conditionally Display Paper Layout Section

    I have a report, that uses the Main Section, and the Trailer Section. The Main Section displays summary data, and the trailer section displays detail data.
    I need to use both sections because the paper size for each section is different - the summary data only needs to print out landscape letter, but the detail data needs to print out landscape legal.
    I also have a format trigger so that the user can choose to display or not display either section of the report. The problem I have, however, is that when a user chooses to not display a section, that page still prints out, it just prints out as a blank sheet.
    Is there a way to conditionally display an entire section of the paper layout? (Header, Main or Trailer)

    You are correct using the trigger to suppress the section content. To get rid of blank pages, add BLANKPAGES=NO to the report call string.

  • Conditional display of "Custom" Buttons in Portal Forms

    Could someone tell me if the following is possible, and briefly explain the steps to a beginner in Portal (but reasonably familiar with PL/SQL):
    Problem - How to display "Custom Buttons" conditionally
    Example -
    a) Assume you have a certain record ("patient_address"). The hospital requires that every patient address be authorized before submitting records to health insurance. However, authorized records should not be authorized again.
    b) Also assume that the "patient_address" table has a column "authorized" (which can contain Y or N)
    * The requirement is to show an "Authorize" button whenever the record being viewed has the "authorized" column as "N" only
    * If possible, this can be further improved by obtaining whether the person viewing the information has permission to authorize, but this can be taken as a next step
    Approaches -
    1. If possible, achieve this in Portal Forms
    2. (worst case) - show the button, but show a message if it is pressed and the action does not apply
    Somehow, it seems as though Portal Forms is not suitable (or does not have the documentation readily accessible) of how to do specific, custom, real world forms design as in this example - could someone please elaborate
    Also, would this be better done by using one of the following in combination with Portal:
    - HTT (will this be supported, given that it is an Oracle internal technology)
    - PHP (is this even compatible with Portal?)
    null

    Hi,
    Conditional display/hide of custom buttons is not yet supported in Portal.
    However, if you are willing to modify the generated form package this could be done.
    Each form has a procedure called row_function which conditionally hides Insert/Update buttons depending on the mode. By default all elements of a form are visible, then row_function modifies the "visibility" property to hide that element.
    for example, this is a fragment of row_function code which hides the Insert button in update mode:
    "_form_state" := p_session.get_value_as_varchar2(
    p_block_name => "_block",
    p_attribute_name => '_FORM_STATE');
    if "_form_state" = 'UPDATE_AND_DELETE' then
    "_idx" := get_index('INSERT_TOP');
    p_form.items("_idx").visible := 'N';
    end if;
    You can add any additional code to check form's session storage/custom package variable/function whatever is more suitable in your case.
    Then you just set visible to 'N'.
    "_idx" := get_index('MY_CUSTOM_BUTTON');
    p_form.items("_idx").visible := 'N';
    Of course the biggest drawback of this is every time you edit your form you will loose your change and must edit the package manually. To minimize the effect you can create a custom package/procedure with type signature matching that of row_function and place your code there, so you will need to add only one line of code to the row_function.
    Hope this will help to resolve the problem, I don't know the status/plans for HTT/PHP support in Portal.
    Thanks,
    Dmitry

  • Search bar conditionally display

    Hi All,
    Iam using Apex 3.2
    iam using Intractive report.here i need to display the serch barof interactive report based on condition.
    But In report Attributes given Only YES /NO option Only.
    But i need Conditional Display.
    I f Any One knows Pls Reply me ....
    Thanks in Advance
    user11366851

    Hi,
    Maybe something like this to page HTML header
    <script>
    function hideIrToolBar(){
      var lHiddenItemVal = $v('P5_HIDDEN1');
      if( lHiddenItemVal == 'S'){
        $x_Hide('apexir_TOOLBAR');
      }else{
        $x_Show('apexir_TOOLBAR');
    </script>And then to page HTML Body attibutes
    onload="hideIrToolBar();"And remember set Cursor focus to "Do not focus cursor" from Page Display Attributes
    Br, Jari
    PS: and take tip from Munkys post
    Edited by: jarola on Nov 17, 2009 3:28 PM

  • Conditional display based on Page Template

    I'd like to make some conditional display based on Page temlate value (definition). Example:
    return page_template='TABS';With such an feature it will be easy to exclude some elements defined on "Page 0" on some pages. I know that this could be done by enumerating page_id's...but in this way it will be much flexible...
    Is there such a feature? Will it be ever possible?

    A more flexible way (IMHO) to do this sort of thing would be to define onload application-level computations that set a application item to either SHOW or HIDE depending on the conditions you need. Then make the Page 0 components conditional upon this application item's value.

  • Conditional Display on multiple items?

    Is it possible to use multiple items in the conditional display region of a report? For example I'm trying to use the
    "Value of Item in Expression 1= Expression 2" and when I populate 1 item with the value in expression 2 it works just great but if I try to place 2 items that would both equal expression 2 it does not work.
    I've tried
    Expression 1:
    P14_ITEM1, P14_ITEM2
    Expression 2:
    10
    Is this possible? And if so is there different syntax I should using in Expression 1 to identify my items?
    Thanks,
    Zala

    I have done something similar but I used the exists statements and write a SQL "SELECT 1 FROM dual WHERE :x1 = :x2".
    Cheers Mike
    Edited by: MikesHotRod on Aug 25, 2008 1:31 PM

Maybe you are looking for