Redirect when no data found

Using Apex 4.1.1

I need my application to redirect to another page when the user performs a search and there is no data found. The query in the report is too complicated and is a "Body of function from PL/SQL returning SQL query" and must be like that. It just does not work on its own.

Initially, I tried to Javascript to run onLoad & run loading Page like:
function redirect_on_no_data_found2()
{
     
     // if user came from non-catalogue page
     if($(".nodatafound").html() == "no data found")
     {     
          redirect('f?p=129:8:'+$v('P1_SESSION_ID_VALUE')+':NO_DATA_FOUND:NO::');
     }
     
}
But javascript as it's too unreliable in IE 7, which is what users use and does not work in some cases while in others works.


Is there another way I could do a redirect without javascript or using the APEX_APPLICATION.redirect procedure. Little short of ideas.

Thank you very much.

Hello

I wrote this blog post where is also link to example
http://dbswh.webhop.NET/HTMLDB/f?p=blog:read:0:article:6611800346018314

I have test, you must use a fixed value as function APEX_UTIL. SAVEKEY_VC2 call parameter and select the double wrap.
In this way, the function is called only once in the report query.

Kind regards
Jari
-----
My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
Twitter: http://www.twitter.com/jariolai

Tags: Database

Similar Questions

  • exception: when no data found

    Hello
    I want to assign a variable var1 leave a select query
    Select attr1 in var1 from table1 where (condition)
    So I want to 0 when no data found in this application, without throwing an exception, the attr1 value so without stopping the program
    someone has an idea?

    Thank you
    concerning
    ELYES

    Hope this helps:

    DECLARE
    v_count PLS_INTEGER;
    BEGIN
    SELECT COUNT(1) INTO v_count FROM TABLE1 WHERE (CONDITION);
    
    IF v_count = 0 THEN
    DBMS_OUTPUT.PUT_LINE('NO DATA FOUND');
    ELSE
    DBMS_OUTPUT.PUT_LINE('DATA AVAILABLE');
    END IF;
    
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('OTHER EXCEPTION');
    END;
    
  • How to hide the buttons when no data found!

    Hi all

    I created two regions

    1 Serach region
    2 results region.

    Initially during the loading of the page with the help of hidden drive I'm Basel to hide 'areas of results' once that they clik this serach button I display area with teo translated region more buttons as buttons 'export' and 'print '.

    It shows very well when there is data in the region of Reulst.
    But when there is no return I displays the message "No data found" but at the same time it displays 'export' and buutons 'print '.
    This button should show only when data are available in the results area.

    Thank you
    David...

    abhishek8299 wrote:
    Use SQL statements (Exists) in the State and write an sql statement it.

    Use this

    SELECT
    1
    FROM form1 MF,bench1 BM,
    participant1 PP,key1 KT
    WHERE MF.ENGAGEMENT_ID=BM.ENGAGEMENT_ID
    AND BM.ENGAGEMENT_ID =PP.ENGAGEMENT_ID
    AND PP.ENGAGEMENT_ID =KT.ENGAGEMENT_ID
    
  • APEX 4.2 classic report when more data found message

    Hello

    Has anyone used report classic message "Times more data found" APEX 4.2?

    I did not get this message illustrated using any report model or any report parameter.

    Need to add a few report template substitution strings?

    It would be great if someone could share example how this message should be used.

    Kind regards
    Jari

    Hi kvlek,

    Thank you

    Could you please share steps how you did it in apex.oracle.com?

    Kind regards
    Jari

  • report "no data found".

    Hello together,

    I use Apex 4.2.4 with a DB XE on Windows.

    I'm creating a mobile application.

    I created a report showing specific information from the user.

    Sometimes, it is possible that there is no information available. In this case the report displays the message/exception "no data found".

    Is there a solution to hide this message?

    My plan is to show only the data if they are available and show nothing when no data found.

    For the user, it should look like this, there is not a report if no data is available.

    I don't want to see the message "no data found".

    Thanks for your help

    Joe

    Joe_990933 wrote:

    I use Apex 4.2.4 with a DB XE on Windows.

    My plan is to show only the data if they are available and show nothing when no data found.

    For the user, it should look like this, there is not a report if no data is available.

    Control if the area of report is displayed using a Exists (SQL query returns at least one row) condition with a query that returns at least one row if the report contains data.

  • Change/Remove "No data found" Message

    Hi all

    How can I change or delete no data found message?

    I can change it by using report attributes > messages > when no data found > (Personal Message), but how can I change/remove it globally (for all the application)?

    Thank you

    Chandra

    Chandra,

    There is a possible way to remove without data Message found at one time to go to

    Modify Application > utilities > specific utilities (appear in the right sidebar) page > region utility > utility region report > grid edit all data found Message numbers

    Here you can write your personal message for each report at a time.

    Leave.

  • No data found exception

    Hello

    I wrote code like this... But I'm not get when no data found exceptional... Please advise... !!!
    create or replace procedure dis_emp(v_empno in number) as 
    
       cursor kk is select * from empl where empno=v_empno;
    
       a kk%rowtype;
    
    
    begin
            open kk;
          
         loop
    
             fetch kk into a;
             exit when kk%notfound;
         dbms_output.put_line(a.empno||'  '||a.ename||'  '||a.job);
         
    end loop;
    close kk;
            
    
    exception
    when no_data_found then
       dbms_output.put_line('Sorry...wrong empid');
    
    
     when others then
       dbms_output.put_line('sorry..');
          
    end;
    concerning
    SA

    Hello

    The no_data_found exception is thrown when you use select it without cursor... under construction.

    And that's exactly what you use when you perform simple extractions. There's nothing "smart" on the declaration of a cursor, instead.

    create or replace procedure dis_emp(v_empno in number) as
         a empl%rowtype;
    begin
         select * into a
         from empl
         where empno=v_empno;
    
         dbms_output.put_line(a.empno||'  '||a.ename||'  '||a.job);
    exception
    when no_data_found then
        dbms_output.put_line('Sorry...wrong empid');
    end procedure dis_emp;
    /
    

    Also note, don't get any exception when you are not really going to deal with.

    Concerning
    Peter

  • Firefox redirects to google when server not found

    If I do a typing error in the address bar (for example, instead of www ww), instead of getting a message saying that the site is not found, Firefox started to take me to a page of Google search for the URL I typed in.

    Also, if I click on a link in a web page and the server in the connection no longer exists, I should get a message saying that the server is not found, but I'm redirected to a google search for the domain name in the link. It's confusing.

    Firefox redirects to google when server not found [SOLVED]

    Previously published in thread https://support.mozilla.org/en-US/questions/925517 (now blocked to I can't update it with the solution - maybe someone can add this solution to that thread?)

    Firefox redirects to google when server not found

    If I do a typing error in the address bar (for example, instead of www ww), instead of getting a message saying that the site is not found, Firefox started to take me to a page of Google search for the URL I typed in.

    SOLUTION: This was caused by the http://www.easyfundraising.org.uk EasyFundRaising toolbar (which I think could rest on the Google toolbar?)

    After disabling this plugin, the problem disappeared. I have notified the EasyFundRaising to this issue.

    Brian

    Added to a thread locked by a forum moderator.
    Above is 931684/questions/931684 by bcraigie

    (I'll leave this locked, locked presumaly because it drew spam)

  • I can't open my email on Firefox, it works on explore. When you go to the page I get this message "the requested URL /hunter/ajax_login/redirect.php was not found on this server."

    Question
    I can't open my email on Firefox, it works on explore. When you go to the page I get this e message "the requested URL /hunter/ajax_login/redirect.php is not found on this server."

    Reload Web pages, and ignore the cache.

    • Hold SHIFT and click reload.
    • Press 'Ctrl + F5' or 'Ctrl + Shift + R' (Windows, Linux)
    • Press 'Cmd + Shift + R' (MAC)

    Clear the cache and cookies from sites that cause problems.

    "Clear the Cache":

    • Tools > Options > advanced > network > storage (Cache) offline: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Tools > Options > privacy > Cookies: "show the Cookies".
  • When I try to change the interactive report columns, then triggers the error: "unable to change column attributes. "ORA-01403: no data found. Pls tell me why?

    When I try to change the interactive report columns, then triggers the error: "unable to change column attributes. "ORA-01403: no data found. Pls tell me why?

    You use listener EA3 ADR?

  • Chart does not display not when No data Message found

    Apex workspace version: 4.2.0.00.27

    Internet Explorer 9

    Flash graphic

    Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    I have developed a standard 2-d column chart that works very well when there are data. I created the graph with the property "When no. found data Message" as "No data Found".


    But this message does not appear when there is no data. The entire table is completely empty. I do not use a custom xml part. It is a simple, standard 2-d column chart. I could see the message "Waiting for data" briefly for a second, then the table renders as white space. I just want the "No data found" message appears every time the data source group is empty.


    I tried to create a diagram of the test in a virtual space that is running on the 4.2.3.00.008 apex version. Whenever the source dataset contains zero return to recording, the message "No data found" seems in good condition.

    Any ideas or suggestions?

    I'm sorry. The question above was going on because my source dataset returned some NULL records even when there was no valid data. (inner left join instead of join). This is the reason why the chart didn't show a message "no data found". It's a coding problem, not a problem of the apex. I apologise for the confusion.

  • Process page not throwing no data found error when you remove the item in a table

    Hi guys,.

    I'm trying to run a process page just before the process of MRU in tabular form and it is throwing an error no data found . Here is my code:
    BEGIN
         
         for i in 1..apex_application.g_f02.count LOOP     
              
              IF apex_application.g_f01(i) is not null THEN
                   
                   UPDATE STOCK
                        SET PRODUCT_QUANTITY = PRODUCT_QUANTITY+apex_application.g_f08(i)
                   WHERE site_id = :P21_SITE_ID and product_id = apex_application.g_f02(i);
                   COMMIT;
                   
              END IF;
         END LOOP;
    END;
    F01 here is the checkbox column and the if statement is the cause of the problem because if I get rid of the update statement (leaving just the commit) then it still throws the error.

    When I click on a checkbox, and hit the Remove button what fires off times this process and then the MRU, I get the error not found data .

    Would appreciate it if someone could shed some light on this. Thank you very much.

    Published by: taepodong on July 1, 2012 07:54

    Hello

    >
    I'm trying to run a process page just before the process of MRU in tabular form and he throws no data were found error. Here is my code:

    BEGIN
    
         for i in 1..apex_application.g_f02.count LOOP     
    
              IF apex_application.g_f01(i) is not null THEN
    
                   UPDATE STOCK
                        SET PRODUCT_QUANTITY = PRODUCT_QUANTITY+apex_application.g_f08(i)
                   WHERE site_id = :P21_SITE_ID and product_id = apex_application.g_f02(i);
                   COMMIT;
    
              END IF;
         END LOOP;
    END;
    

    Here f01 is the column of the box and the if statement is causing the problem because if I get rid of the update statement (leaving just the commit) then it still throws the error.

    When I click on a checkbox and click on Remove button that triggers both this process and then MRU, I get the no found error of data.
    >

    You iterate over the f02 and seeking f01 not null. It's the misuse of the checkbox element. Please see these links. in particular the examples of process OnSubmit.
    http://docs.Oracle.com/CD/E23903_01/doc/doc.41/e21676/apex_item.htm#CHDDCHAF
    http://docs.Oracle.com/CD/E23903_01/doc/doc.41/e21676/apex_app.htm#AEAPI215

    Kind regards

    PS: That's what you need to understand
    >
    Note that the boxes displayed by using APEX_ITEM. CHECK box will only contain values in the APEX_APPLICATION tables for those lines that are checked. Unlike other elements (TEXT, TEXTAREA, and DATE_POPUP) that can contain an entry in the corresponding table of APEX_APPLICATION for all submitted ranks, a checkbox will be an entry in the APEX_APPLICATION table if this option is selected.
    >

    Published by: Dominique July 2, 2012 09:44

  • Interactive report: "no data found" when first loading

    Hello

    I use APEX 4.0 with Oracle 10 g r2 under Windows XP Pro SP3.

    I have an interactive report and a menu with a few items to filter the report.

    The problem is that the first time I load the page, the report shows "no data found", when I reboot, it works. If I navigate to another page and then I go back to the page of report, it also works.

    There seems to be a problem with session state, but I can't found how do works, even using an AJAX setItemInSessionState() function.

    The query depends on the values of the elements:
    select
         SPAT_ID, SPAT_ACCL_NAME, SPAT_AREA_NAME, SPAT_CLASS, SPAT_NUMBER, SPAT_PT, SPAT_TYPE, SPAT_STATUS,
         round(SPAT_CUMUL,2) as "SPAT_CUMUL"
    from
         SPATIAL_POINTS
    where
         upper(SPAT_AREA_NAME) LIKE upper(:P3_FILTRE_AREA_NAME)
    AND upper(SPAT_CLASS) LIKE '%'||upper(:P3_SPATIAL_CLASS)||'%'
    AND upper(SPAT_NUMBER) LIKE '%'||upper(:P3_FILTRE_NUMBER)||'%'
    AND instr(upper(:P3_SPATIAL_POINT_VALUES),upper(nvl(SPAT_PT,' '))) > 0
    AND instr(upper(:P3_SPATIAL_TYPE_VALUES),upper(SPAT_TYPE)) > 0
    AND (:P3_FILTRE_ACC_NAME IS NULL AND spat_accl_name IS NULL OR CASE WHEN :P3_FILTRE_ACC_NAME = '%' THEN nvl(spat_accl_name,'_NULL_') ELSE :P3_FILTRE_ACC_NAME END = nvl(spat_accl_name,'_NULL_'))
    I've implemented on apex.oracle.com, if you find the time to take a look: http://apex.oracle.com/pls/apex/f?p=4550:1
    You should get a "no data found" the first time the page loaded.

    Workspace : yb202826
    login : User1
    password : u_s_e_r_1
    application : 20588. Page 1 of the Geode

    Thank you!

    Yann.

    This problem is described here:

    http://Apex.Oracle.com/pls/OTN/f?p=31517:117

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

  • Hide the "No data found" msg in the region to report when you 1st click Search page

    Hello

    (Sorry if it's confusing but my APEX is in FRENCH and I tried to translate)

    I created a search page in my application.

    1. I have an HTML region, with a search box and I have the search button

    2 - I have a region (PL/SQL source) report, which sometimes does not return any data, giving a message 'No Data Found.'.


    When I click on the search page for the 1st time (on my navigation bar), I like to HIDE the region report so that I do not have the message "no data found".

    Only once we click the search button and there is no result, I want to have the message "no data found".

    How can I achieve this?

    Thank you

    Roseline

    1. create an item hidden on your page (P1_HIDDEN_ELEMENT)

    2. place your message no data found in a span tag

    No Data Found
    

    3 create a load calculation to set your P1_HIDDEN_ELEMENT to 'no_data_found' if it is NULL and put it to ' ' if it is NOT NULL - body of the type PL/SQL function

    BEGIN
       IF :p1_hidden_element IS NULL
       THEN
          RETURN '';
       ELSIF :p1_hidden_element IS NOT NULL
       THEN
          RETURN ' ';
       END IF;
    END;
    

    4 put this in the footer:

    &P1_HIDDEN_ELEMENT.
    

    The alternative would be to create a display area – pure HTML and display only the first. Once the search has begun this region would remain hidden and only the report themselves.

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

  • When the research report I get the message "no data found".

    When I run a search on one of the fields of research, I get the message "no data found". Anyone can help me to understand what it is that I don't hurt or not done? Thank you

    Deanna

    http://Apex.Oracle.com/pls/OTN/f?p=4550:1:4031563210204584

    Workspace: DEANNA2
    Username: DDOVE@KHP. KS.GOV
    Password: Dclipse03

    Page 21

    No, I added a calculation to the page to see what is the sql code that is returned by the function... Now, I could add in another column and see what happens...

    That's why I suggested moving it to a function outside the page... You can test this in the sql command window and the prefect what you are after... Have done reports a little like this... Or even more fun, with a function in the pipeline...

    Thank you

    Tony Miller
    Webster, TX

Maybe you are looking for

  • System preferences icon has replaced the dock

    Hi all I have a strange behavior with the dock in macOS Sierra, especially with the "System Preferences" icon After you open the system preferences application, the icon was his suddenly replaced by another icon (see image below). It looks like a Doc

  • Universal Serial Bus (usb) controller - the missing driver problem

    Hi all.Name of the product and operating system: HP (Notebook) 15-r003sv - Windows 7 x 64Product no.: G7E53EA #AB7 This laptop has windows 8 and everything works fine, then I installed windows 7 x 64 and I have problem with the usb ports. they do not

  • How to vary the number of entries?

    I have to design a system that reads the data from sensors and the Treaty. Is it possible to change the number of entries without any changes to the program? As by specifying the number of entries and the program adapts. I use labview 2009. Also is i

  • How do Factory Restore knows what disk to restore?

    If someone has two or more hard drives in their computers and they are ready to do a restore factory, how does he know which drive to restore?  I fear that he will restore is in the wrong drive, or if it installs in your drive, it will delete all par

  • Advantages and disadvantages of the move to 64-bit (part of the migration of Windows 7)

    Windows 7 offers the first decent opportunity for many people to move from 32 to 64-bit.  Why would we want to do this? What are the main benefits of the 64-bit to 32-bit?  The disadvantages?How much faster (what) is 64 bit to 32 bit?How do you know