Condition on a Region

Greetings - I'm an APEX novice. I'm trying to create a condition on a region that makes it visible for a certain length of time. It would be like putting an expiration date so the region is no longer visible after a certain date. Also, can this be done by time e.g. a region expires/is not visible after say 2:00 pm?
Thanks!
David

Hi David,
simply put a PL/SQL Condition to your Report with a code like that:
SYSDATE < TO_DATE('25.05.2010 14:00')brgds,
Peter
Blog: http://www.oracle-and-apex.com
ApexLib: http://apexlib.oracleapex.info
Work: http://www.click-click.at

Similar Messages

  • 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

  • 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

  • 2 Region Conditions on one region

    I want my region called Territory Information only to appear on my form if:
    P10_INTL_DOM = D (return value)
    and
    P10_MAIN = Y (return value)
    How do I write this when it looks like the conditional section allows only for 1 condition at a time? I am so new at Apex, so please be detailed. Thanks!

    I got it! I chose PL/SQL Expression and entered the following in Expression 1.
    :P10_INTL_DOM = 'D' AND :P10_MAIN = 'Y'

  • Conditions for regions depending on more than one element

    Good morning,
    I've got an easy question: I want a region only to be shown, when elements (:P1_x, :P1_y, :P1_z) are null. this is no problem if showing region depends on only one element:
    "Der Wert des Elements in Ausdruck1 ist NOT NULL" --&gt; so Ausdruck1 is filled with: P1_x
    But how can I simplfy APEX, that showing region depends on more then only this one element . I tried with AND (P1_x and P1_y and P1_z) or with semikolon (P1_x; P1_y; P1_z), but it doesn't work.
    So how can I tell APEX more than only one condition for showing region?
    thank you...

    Bettina,
    Condition type of:
    PL/SQL Expression
    Expresion:
    :P1_ITEM1 IS NULL
    AND
    :P1_ITEM2 IS NULL
    AND
    :P1_ITEM3 IS NULL
    Does that solve your problem?
    Andy

  • Conditional region display

    I am trying to add what I think is a simple condition to a region display with no luck.
    Trying to use the
    Value of item in Expression 1 = Expression 2
    with no luck.
    I have a text item P312_TABLE_NAME with the value SERVER.
    Yet, it does not display when the text item is SERVER
    What am I doing wrong?
    TIA

    Hi TIA,
    I had same issue and it was taking time. I tried your resolution. It worked pretty good. Thanks for posting your resolution to help others.
    Raj

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

  • Conditional Region Title

    APEX 3.0, RDBMS 9.2.0.4
    I have a report in one of my regions on a page.
    I see from the forum there is a way to edit the report template and remove the region title for the report.
    Is there a way to make the title conditonal? That is to display only when the report has actual data in it?
    Thanks in advance,
    Barry

    First, it worked, and I thank you.
    Not that I am complaining BUT ...
    why doesn't the condition evaluate the region source query (below) and determine whether one row was returned.
    select e.ename, e.empno, e.sal, d.deptno
    from emp e, dept d
    where e.deptno = d.deptno
    and e.ename = :p1_ename
    To be honest, I tried the EXISTS attribute in region condtion, but did not add the select statement you sugggested in Expression 1. My approach was not working and I figured I had it all wrong.
    So, as instructed by your response, I set the condtion to EXISTS and added the folowing query in Expression 1 and it will conditionally display the region:
    select 1 from emp e where e.ename = :p1_ename
    Whyt does APEX make you put in two queries: one for the region source and one to evaluate whether the region should be conditional displayed?
    I am sure there is a good reason and I am just curious.
    Thanks again for your help.
    Barry

  • ORA-06502 on "Help Text" region when changing pages on a tabular form

    Hello everybody,
    We are developing an application on Apex 4.1.0.00.32. This application have some pages with tabular forms and these pages uses a page zero as template. In this page zero, we have added two sidebar regions: a list region to navigate on the application and a help text to describe how to use our application.
    The problem occurs when the tabular split the records into pages (since it has more records that it can show on a single page). When the user clicks to change to another page, Apex raises an ORA-06502: PL/SQL: numeric or value error as described below:
    Erro ao renderizar a região "Ajuda". ORA-06502: PL/SQL: erro: erro de conversão de caractere em número numérico ou de valor
    Informações Técnicas (visível somente para desenvolvedores)
    is_internal_error: true
    apex_error_code: APEX.REGION.UNHANDLED_ERROR
    ora_sqlcode: -6502
    ora_sqlerrm: ORA-06502: PL/SQL: erro: erro de conversão de caractere em número numérico ou de valor
    component.type: APEX_APPLICATION_PAGE_REGIONS
    component.id: 2
    component.name: Ajuda
    error_backtrace:
    ORA-06512: em "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 3654
    ORA-06512: em "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 4204
    Obs: Our database is in Brazilian Portuguese, so I guess it will be hard for some people to understand the first two lines! :)
    We have tried to change the pagination style of the tabular form and change the region model of the help text but the problem still happens.
    Does anyone an ideia about what this may be?
    Thanks in advance!

    I am getting the exact same message, to the line number, also in APEX 4.1.0.0.32.
    Occurs when changing pages in a classic report, Standard region template, select list pagination, when selecting a different pagination set.
    In English:
    Error during rendering of region "Matched Participants Help & Hints".
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    Technical Info (only visible for developers)
    is_internal_error: true
    apex_error_code: APEX.REGION.UNHANDLED_ERROR
    ora_sqlcode: -6502
    ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    component.type: APEX_APPLICATION_PAGE_REGIONS
    component.id: 2
    component.name: <strong>Matched Participants</strong> Help & Hints
    error_backtrace:
    ORA-06512: at "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 3654
    ORA-06512: at "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 4204
    There are no conditions on the region, and no date string within the Help text. Some HTML <strong> tags, that's it.
    The Help region renders fine the first time.
    The Debug info does not help any:
    3.798360.00062Computation point: After Box Body4
    0
    3.798990.00081Processes - point: AFTER_BOX_BODY4
    0
    3.799790.00068Region: <strong>Matched Participants</strong> Help & Hints4
    0
    3.800470.00213Region rendered dynamically because request was not null4
    0
    3.802590.00096Add error onto error stack4
    0
    3.803550.00084...Error data:4
    0
    3.804400.00084......message: Error during rendering of region "<strong>Matched Participants</strong> Help & Hints".4
    0
    3.805240.00084......additional_info: ORA-06502: PL/SQL: numeric or value error: character to number conversion error4
    0
    3.806080.00081......display_location: ON_ERROR_PAGE4
    0
    3.806890.00081......is_internal_error: true4
    0
    3.807700.00084......apex_error_code: APEX.REGION.UNHANDLED_ERROR4
    0
    3.808540.00082......ora_sqlcode: -65024
    0
    3.809350.00234......ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error: character to number conversion error4
    0
    3.811700.00082......error_backtrace: ORA-06512: at "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 3654 ORA-06512: at "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 4204 4
    0
    3.812510.00081......component.type: APEX_APPLICATION_PAGE_REGIONS4
    0
    3.813310.00110......component.id: 24
    0
    3.814420.00099......component.name: <strong>Matched Participants</strong> Help & Hints4
    0
    3.815400.00076...Show Error on Error Page4
    0
    3.816160.00344......Performing rollback4
    0
    3.819610.00225Processes - point: AFTER_ERROR_HEADER4
    0
    3.821850.00268Processes - point: BEFORE_ERROR_FOOTER4
    0
    3.82453-End Page Rendering
    Any thoughts on where to poke around for this one?
    Thanks - Karen

  • Report region with sql query

    Hi
    I have a report region with sql query. There are two regions in page. On top of page, user enters data and after that second region show enterd data which is report region
    based on sql query.
    Now,when this page is opned, as user had not entered any thing, report region shows "no data found" message. Is it possible to remove that message or
    may i conditionally disaply report region i.e if data is inserted then only report region is dispalyed.
    Thanks

    >
    i was trying with select count(1) in expression.
    >
    Just for your info, COUNT() (without any grouping obviously) with always return 1 row. If there are no result for the query then 1 row will be returned with a value of zero - so there are results returned.
    Secondly, why were you using COUNT(1) rather than COUNT(*)? That is is faster is a very common misconception and not true. If you need to know how many rows have been returned, use COUNT(*). If you need to take nulls into account (ie. not include them in your count) then use COUNT(column_name) and name the column that you are interested in specifically.
    Cheers
    Ben

  • Clear data in sql report region on page load....

    I have a sql report region.when i run the page the data getting populate on the screen because of the sql query. On page load i dont want to populate the data in screen.
    i have created the page process to clear cahe the page. but the data is not clearing from the screen.
    How to resolve this?
    Thanks & regards,
    Skud.

    Skud,
    you can create condition in report region query e.g. where 1 = :PXX_ITEM, and populate that item on click and then refresh report.
    Bt,
    Marko

  • Dynamically displaying a new region (row?) based on immediate user input

    Whew, figuring out a title was almost as hard as trying to explain what I want to do!
    Okay, a little background first.
    My app has 178 main data fields, spread across about 35 tables. The users want to be able to search any and all data fields. So, I wrote a PL/SQL package that for each master record, loops through all of the child tables and creates (more or less) an XML file for each master record (which I store in a CLOB field). When any data in any table is changed, a trigger fires to re-update that CLOB field as well. I then used Oracle Text to create an index on the CLOB field, and now the users can search across all of the available information for each master record and get a list of which records contained what they were looking for.
    So here's the first part of the problem. The app is a Mineral Occurence database for all mineral information world-wide. Say they enter "Brazil" as what they want to search for, they not only retreive all of the mineral sites in Brazil, but also all of the sites where one of the mining companies may be based in Brazil, or Brazil is one of the comments, etc. While this is the expected behaviour, it's still not quite what they expected (but they also don't want to get rid of this behaviour either).
    So, since the CLOB field is already formatted with XML-type tags, what I want to do is to have an Advanced Search page, where the user can specify the table name to search, or the field name, or both. What I'd like to do is at the end of each line, have a select list with an "AND" or "OR' box, and if that gets a value, then dynamically create another 'row' underneath the first row, with the same three 'boxes' (actually select lists), and continue on until the user has specified exactly what they want to search for.
    I would rather not have to create a whole bunch of regions or rows, and then determine at runtime whether or not to display them.
    So i would have (using underscores as the boxes/fields):
    Table to Search        Field to Search          And/Or
    ______________          _____________          _______Each of the above would be a select list.
    Anybody have ideas on how I can accomplish this? Any Javascript or AJAX-type solutions that a dummy like me can easily implement? I've seen something almost similar on Carl's example pages to Hide/Show a region(?), but understanding the underlying code and then modifying it for what I want to do is extremely complicated (for me) at best.
    Thanks.
    Bill Ferguson

    Well, after searching through the QBE results (even some of mine), the only thing that comes close is Earl's (http://htmldb.oracle.com/pls/otn/f?p=36337:14). Actually his layout is almost perfect and pretty identical to what I want/need. Vikas' example seems like what I've toyed with on some other pages in my app, using a simple UNION ALL with nulled fields in the select statement, which won't work for what I need, at least I can't seem to visualize how I could incorporate that same code logic.
    However, unlike Earl's, when/if the last column (which I'd have as the 'AND/OR' select list) is populated, I'd like to dynamically display another new row.
    Now I know I could do it by making the last column a 'Select List With Submit', but that would neccessitate my creating about 25 regions (to hopefully cover the max any of the users would ever need), and then conditionally display the region based on whether or not the previous 'AND/OR' condition field was populated. It would also require a whole slew of page refreshes, which is clunky.
    It seems like there should probably be a way with AJAX to accomplish something similar. I think I remember seeing something along these lines in the last year or so on here, but I can't find it.
    Something like a cross-breed of Earl's example page above mixed with Carl's example at http://htmldb.oracle.com/pls/otn/f?p=11933:39:4740898821262791902::NO:RP:: which would automatically fire on the poplulation of the last select list is probably the best I can accomplish, unless somebody has some better ideas on how to do this. Using Carl's htmldb_remix code, I can avoid all the submits and the resulting page refreshes, but the code itself will take an old dummy like me a while to figure out.
    Thanks for the ideas though.
    Bill Ferguson

  • Hide page zero regions in the builder

    Hi
    We are using APEX version 4.0.2. are have many shared regions (SQL Reports) placed on page zero.
    There are conditions on these (page must be in...), and that works fine when running the application.
    The problem is in the builder, where these page zero report regions appear in the builder, even though the page is not included in the region condition
    (and the region is never shown on the page at runtime).
    It is a bit confusing to see these page zero regions in the builder - as a developer, so have anybody found a way to hide them ?
    Note: we also have SQL regions on page zero, but these do NOT appear in the builder ??
    Brgds
    Martin

    Anybody have any input to this ?
    For me it would make sense that I only see the those page zero region which actually apply to (are used on) my page.
    I see the issue concerning this being determined at runtime, howver perhaps an exception could be made for for "page in" condition ?
    Brgds
    Martin

  • Upload image in Dynamic Region

    Hello.
    Excuse me. my English is not very good.
    I use Jdeveloper 11.1.1.3.0
    in my application i have 2 Bounded Task Flow and i use them as a dynamic region.
    in each bounded task flow i use InputFile component to upload image. but i can't upload image, because when i click the Browse button and select the image, then i click another button in my application to upload image, but the InputFile component value reset . I don't know why this happen.
    this problem just happen in dynamic region, in another case I don't have any problem with upload image.
    Thanks.

    Habib,
    Welcome to OTN.
    As you said you are using taskflows as region, can you check the refresh condition of the region binding in the pagedef and see if that has anything to do with this?
    -Arun

Maybe you are looking for

  • I need help with voice memo and volume control

    I really dislike to update my iphone's software.  I have Iphone 4S and I have been using voice memo to record lectures for sometime.  It was working well till updated my Iphone's software (IOS or whatever that is).  Now I can't transfer my voice memo

  • FCP to PC, Mac and Television Pal and NTSC

    I am editing a DVD for a French dancer who wants to send out the footage as a promotional piece. Target is Europe, North and South America. PC, Mac and Television. When things looked OK on the Mac I burned a dvd from DVD studio Pro. Checked on two PC

  • How do you troubleshoot Caching Errors in Java Runtime Environment?

    I have run into Caching Errors while using JRE (versions 1.4.2 and 1.5.0, various updates) using Windows XP and IE6. The error screen has the title Error - Cache and appears when trying to download JAR files through a secure HTTP connection. The erro

  • Displaying content in a separate window

    I have the results of an ldap search being displayed in a JSP container, but want to be able to display the individual details of an entry in a separate window when the user clicks on an entry. I have tried doing a window.open (and using the target a

  • XSD to java class

    Anyone know an application that convert automatically a XSD file into a java class that can create and manipolate a XML file (based on my XSD)? Thanks MAuro