Apex Tabular report validation

This is the revised version. I need a validation on tabular form field. There is no error with the validation but it is not working as expected. I need to look for the row data change and based on the selection need to check the project type and based on it raise the error if the selection is not correct.
declare
v_project_type varchar2(1);
v_error VARCHAR2 (4000);
begin
for i in 1 .. apex_application.g_f04.Count
loop
if apex_application.g_f01(i) IS NOT NULL -- CHECKSUM FIELD
AND wwv_flow_item.md5(apex_application.g_f05(i) -- ENAME
) <> apex_application.g_f01(i)
then
select project_type
into v_project_type
from pm_project
where project_id = apex_application.g_f04('PROJECT_ID',i);
-- now check valid task IDs for this project type
if v_project_type = 'C' then
if apex_application.g_f05.V('TASK_ID',i) not in
('E3','E4','E6','P4','P5','P6','P7','P8') then
v_error :=
v_error
|| '</br>'
|| 'Invalid task for capital project '
|| apex_application.g_f05(i)
|| '.';
end if; -- task ids for C
elsif v_project_type = 'E' then
if apex_application.g_f05.V('TASK_ID',i) not in
('E3','E4','E6') then
v_error :=
v_error
|| '</br>'
|| 'Invalid task for Expense project '
|| apex_application.g_f05(i)
|| '.';
end if; -- task ids for E
elsif v_project_type = 'R' then
if apex_application.g_f05.V('TASK_ID',i) not in
('E1','E2','E5','E7') then
v_error :=
v_error
|| '</br>'
|| 'Invalid task for RTS project '
|| apex_application.g_f05(i)
|| '.';
end if; -- task ids for R
end if; -- project type
end if;
end loop;
RETURN v_error;
end;
Edited by: user9108344 on Jun 13, 2011 1:17 PM
Edited by: user9108344 on Jun 13, 2011 1:19 PM

Version : Apex 4.0.
I have tasks for the projects in one table and project type in an other table. I am trying to create a validation if some task is selected against the project based on the selection made my validation should check what type of project type associated with that project based on project id in that row. If the project type is 'C' then it should allow me to choose only the tasks associated with the 'C' type project which are ('E3','E4','E6','P4','P5','P6','P7','P8') else if it is 'R; there is different set it should allow me to save along with the project_id.
declare
v_project_type varchar2(1);
v_error VARCHAR2 (4000);
begin
-- Need to check if the task id row has changed against projectid row
for i in 1 .. apex_application.g_f04.Count
loop
if apex_application.g_f01(i) IS NOT NULL -- CHECKSUM FIELD
AND wwv_flow_item.md5(apex_application.g_f05(i) -- ENAME
) <> apex_application.g_f01(i)
then
-- If the row has changed then look for project type for that project id from the table
select project_type
into v_project_type
from pm_project
where project_id = apex_application.g_f04('PROJECT_ID',i);
-- now check valid task IDs for this project type
if v_project_type = 'C' then
-- if project type is C then task id has to be in the string below.
if apex_application.g_f05('TASK_ID',i) not in
('E3','E4','E6','P4','P5','P6','P7','P8') then
v_error :=
v_error
|| '</br>'
|| 'Invalid task for capital project '
|| apex_application.g_f05(i)
|| '.';
end if; -- task ids for C
elsif v_project_type = 'E' then
-- if project type is E then task id has to be in the string below.
if apex_application.g_f05('TASK_ID',i) not in
('E3','E4','E6') then
v_error :=
v_error
|| '</br>'
|| 'Invalid task for Expense project '
|| apex_application.g_f05(i)
|| '.';
end if; -- task ids for E
elsif v_project_type = 'R' then
-- if project type is R then task id has to be in the string below.
if apex_application.g_f05('TASK_ID',i) not in
('E1','E2','E5','E7') then
v_error :=
v_error
|| '</br>'
|| 'Invalid task for RTS project '
|| apex_application.g_f05(i)
|| '.';
end if; -- task ids for R
end if; -- project type
end if;
end loop;
RETURN v_error;
end;
--if not in those string it has to throw error. Please let me know if you are still looking for more information.  This above validation is not throwing any error neither performing anything. I am not sure where i am wrong with the code.
Thanks

Similar Messages

  • Apex tabular report with title heading

    hi all,
    I want to create a apex report that is downloadable ( is that download or upload? I am confused about the term) anyways a report the is covertible to excel spreadsheets format, but I want it including the title of the report too printed on the excel file, when the user click the download link.
    example:
    SALES STATISTICS FOR
    JAN-08 to DEC-09
    PRODUCT_NAME    JAN   FEB    MAR   APR   MAR  JUN   JUL  AUG   SEP    OCT    NOV   DEC   TOTAL
    product1               10     15         9    7       0       2       1    8      10      12      20      15      105
    product2                0        0         0   0       0        0       0    0       0       0        0        0          0
    .Thanks a lot

    This is possible in later versions of Apex by clicking the Print Attributes tab when you edit the report. In there is a Page Header region that allows you to create you report title. This is available in both Standard and Interactive reports.
    Is this what you meant or is there a twist.
    Cheers
    Shunt

  • Tabular Form Validation not working in tabular form APEX 4.0

    Hi,
    I am using APEX 4.0. I have a tabular form with Tabular form validation done with it.
    Item not null is the validation.. so if I dont type any value in the any of the fields in the tabular form and press the Submit button, the first time error is shown... but when I click the Submit button again, with still the empty rows the page is submitted.
    How to resolve this issue?
    Edited by: Suzi on Oct 5, 2010 11:13 AM

    Look at this thread - Re: Validations of tabular forms in 4.0

  • Validation on Date Field in tabular Report

    Hi All,
    I have manually created the Tabular report and in that I have TWO DATE field
    1)Start Date
    2)End Date
    Now i want to put validation on start date as - Start Date Should Be More than sysdate.
    and validation on End date as - End Date should be More taht Start Date.
    How to put the validation ?

    Manish Jha wrote:
    What is the error you are getting ? Try executing the process in SQL workshop with hard coded values of apex_application.g_f03 and debug the error.
    Thanks,
    Manish
    >What is the error you are getting ? Try executing the process in SQL workshop with hard coded values of apex_application.g_f03 and debug the error.
    Thanks,
    Manish
    Hi manish ,
    I have Used the following code to validate end date should be more less than start date;
    DECLARE
    l_error VARCHAR2 (4000);
    BEGIN
    IF TO_DATE(apex_application.g_f05 (i), 'DD-MON-YYYY ') > TO_DATE (apex_application.g_f04 (i),'DD-MON-YYYY'
    THEN
    l_error :=l_error
    || '</br>'
    || 'Row '
    || i
    ||' ,TEST';
    END IF;
    END LOOP;
    RETURN LTRIM (l_error, '</br>');
    END;
    it's giving the error like :
    ORA-06550: line 16, column 6: PLS-00103: Encountered the symbol "RETURN" when expecting one of the following: begin function pragma procedure The symbol "begin was inserted before "RETURN" to continue. ORA-06550: line 16, column 24: PLS-00103: Encountered the symbol "BEGIN"
    Error ERR-1024 Unable to run "function body returning text" validation.
    What to change in the code?
    Edited by: N.K on Jun 23, 2009 11:43 PM

  • How to decrease the column size in a tabular report

    Hi ,
    How can i reduce the column size in a tabular report in oracle apex.
    my report is having 90 coulmns and i want that should come in once sceen so i want to decrease the size of columns as well as the font size of values + column_name..
    any suggestion ?
    Thanks
    Nitin

    Hello,
    Oracle APEX OTN Forum is here : Oracle Application Express (APEX)
    Regards

  • How to set the Background Color of a Text Field in a Tabular Report.

    Hello,
    I tried to set the Background Color of a Text Field in a Tabular Report.
    But I was not able to change this colur.
    In the report attributes --> column attributes
    I tried already:
    1. Column Formating -- >CSS Style (bgcolor: red)
    2. Tabular Form Element --> Element Attributes (bgcolor: red)
    but nothing worked.
    Can anybody help me?
    I Use Oracle Apex 2.2.1 on 10gR2
    thank you in advance.
    Oliver

    in "Report Attributes" select the column to move to the "Column Attributes" page. In the "Element Attributes" field under the "Tabular Form Element" region enter
    style="background-color:red;"
    I will also check if there is a way to do this via the template and post here again
    edit:
    in your template definition, above the template, enter the following:
    < STYLE TYPE="text/css" >
    .class INPUT {background-color:red;}
    < /STYLE >
    (remove the spaces after the < and before the >)
    change "class" to the class that the template is calling
    (I'm using theme 9, the table has: class="t9GCCReportsStyle1" so I would enter t9GCCReportsStyle1)
    A side-effect of using this second version is that ALL input types will have a red background color--checkboxes, input boxes, etc.
    Message was edited by:
    TheJosh

  • Radio button column in the tabular report

    Hi everyone,
    I have a tabular report. I wanted to have radio button and check box some of the field. Please take a look at my sample application.
    http://apex.oracle.com/pls/otn/
    Workspace ==> SHYIN
    username ==> SHY
    password ==> shy
    Application ID : 29879 - TabularForm
    On page 2, of the detail form, I want to have radio button in Primary Contact column and check box in status column. I would appreciate any suggession. Thanks.
    SHY

    Hi Andy,
    I surely come back with new question!
    Now, I am trying to change the status column to check box. I can see the correct status the check box in the form. But when I tried to add new rows or update anything, I am getting "No data found" error.
    here is my query
    SELECT
    APEX_ITEM.HIDDEN(1, SEQ_ID) || APEX_ITEM.HIDDEN(2, C001) || APEX_ITEM.RADIOGROUP(3, C001, NULL, NULL, 'onclick="javascript:$x(''P2_SELECTED_ID'').value=' || C001 || '"') PRIMARY_CONTACT,
    apex_item.text(4,C002) name,
    apex_item.text(5,C004) phone,
    APEX_ITEM.HIDDEN(6, C006) || apex_item.checkbox(7,C001, null, C005) INACTIVE
    from apex_collections
    where collection_name = 'C_CONTACT_INFO'
    this is the updated Contact_Collection
    begin
    IF NOT APEX_COLLECTION.COLLECTION_EXISTS('C_CONTACT_INFO') THEN
    apex_collection.create_or_truncate_collection(p_collection_name => 'C_CONTACT_INFO');
    for y in (select ID,
    NAME,
    PRIMARY_CONTACT,
    PHONE,
    decode(STATUS, 'I', ID, null) status,
    CUSTOMER_ID
    from CONTACTS
    where CUSTOMER_ID = :P2_CUSTOMER_ID)
    LOOP
    apex_collection.add_member(
    p_collection_name => 'C_CONTACT_INFO',
    p_c001 => y.ID,
    p_c002 => y.NAME,
    p_c003 => y.PRIMARY_CONTACT,
    p_c004 => y.PHONE,
    p_c005 => y.STATUS,
    p_c006 => y.CUSTOMER_ID);
    end loop;
    END IF;
    end;
    here is my updated Update_Collection process
    DECLARE
    V_C003 CHAR(1);
    V_C001 NUMBER;
    V_C005 CHAR(1);
    BEGIN
    FOR X IN 1..APEX_APPLICATION.G_F01.COUNT
    LOOP
    V_C001 := APEX_APPLICATION.G_F02(X);
    IF V_C001 = :P2_SELECTED_ID THEN
    --HTP.P('YES');
    V_C003 := 'Y';
    ELSE
    --HTP.P('NO');
    V_C003 := 'N';
    END IF;
    if APEX_APPLICATION.G_F07(X) = APEX_APPLICATION.G_F02(X) THEN
    V_C005 := 'I';
    ELSE
    V_C005 := 'A';
    END IF;
    APEX_COLLECTION.UPDATE_MEMBER (
    P_COLLECTION_NAME => 'C_CONTACT_INFO',
    P_SEQ => APEX_APPLICATION.G_F01(X),
    P_C001 => APEX_APPLICATION.G_F02(X),
    P_C002 => APEX_APPLICATION.G_F04(X),
    P_C003 => V_C003,
    P_C004 => APEX_APPLICATION.G_F05(X),
    P_C005 => V_C005,
    P_C006 => APEX_APPLICATION.G_F06(X));
    END LOOP;
    END;
    I did not make any changes to Save_Contacts process.
    Thanks
    SHY

  • Second LOV based on First LOV in Oracle APEX tabular Form

    Hi,
    I had created a tabular form in which I am having two LOV's. This form is based on a query.
    I had created a javascript function which internally calls AJAX and populates the second LOV based on the value selected in first LOV when onchange.
    But the issue is, when the user recalls this APEX page to view the details or edit the details, the second LOV shows all the values instead of showing only the values related to first LOV.
    In the second LOV query I am trying to write the below query.
    select function_name fn
    ,function_code_id fci
    from catering_function_codes
    where function_type_id = NVL(#FUNCTION_TYPE_ID#,function_type_id)
    order by to_number(function_code_id)
    in which #FUNCTION_TYPE_ID# is the value of first LOV. But I am getting the below error.
    report error:
    ORA-20001: Error fetching column value: ORA-06550: line 1, column 187:
    PL/SQL: ORA-00911: invalid character
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
    How can you refer to the Second LOV the value of First LOV in a report based tabular form?
    Kindly let me know if you do not understand the issue.
    Please help me in this issue.
    Thank you
    Regards
    Dev

    Hi Roel,
    Thank you for the quick reply.
    I used the query as given by you. This time it is not giving any error but showing all the values in the second LOV irrespective of what ever value is present in the first LOV
    This is an apex tabular form which is generated by apex based on a query. The controls will be dynamically generated by APEX for each row. How can we hard code the control name to :P99_FUNCTION_TYPE_ID?
    Please help me in this issue. Thank you
    Regards
    Dev

  • Calling PL/SQL anonymous block from href in tabular report

    apex 2.2.
    I've got a tabular report where I've added some img columns with a href to call diff processes
    for example
    "<a href="f?p=&APP_ID.:22:&APP_SESSION.:BRANCH_TO_PAGE_ACCEPT|NEW_PROXY:NO:::22,ABCDEF ><img src="/i/asyl.gif" border="0" alt="Runprocess"></a>"
    When clicking on an image column in row x then I would like to run the process - no page submit.
    The pl/sql anonymous block process source calls package.storedproc(p1,p2) - two in parameters
    I'm struggling with the syntax and is wondering if there's a smarter way to achieve the same function
    Any ideas most welcome
    Thanks
    Peter

    &lta href="f?p=&APP_ID.:22:&APP_SESSION.:BRANCH_TO_PAGE_ACCEPT|NEW_PROXY:NO:::22,ABCDEFG" &gt&ltimg src="/i/asylogin.gif" border="0" alt="Process"&gt&lt/a&gtQuestion is how can you pass values from a row in a tabular report to the application process ?

  • Set value for textarea field in tabular report

    Hi all,
    I need some help setting textarea values in a tabular report. The tabular report is for users to be able to build their own ad hoc report, by specifying which columns should be included and filtered. Here are the example tables:
    -- Table that holds all of the data for the report.
    create table vehicle (
      make varchar2(50),
      model varchar2(50),
      type varchar2(50),
      year number);
    insert into vehicle values ('Toyota','Camry','Sedan','2008');
    insert into vehicle values ('Toyota','4Runner','SUV','2008');
    insert into vehicle values ('Honda','Civic','Compact','2011');
    insert into vehicle values ('Honda','Accord','Sedan','2010');
    insert into vehicle values ('Ford','F150','Truck','2011');
    -- Table that holds the columns that are available to be filtered in report.
    create table vehicle_cols (
      col_id varchar2(50),
      col_label varchar2(50));
    insert into vehicle_cols values ('make','Vehicle Make');
    insert into vehicle_cols values ('model','Vehicle Model');
    insert into vehicle_cols values ('type','Vehicle Type');
    insert into vehicle_cols values ('year','Vehicle Year');
    -- Table that holds filters saved by user.
    create table vehicle_user_saved (
      saved_rpt_name varchar2(50),
      col_id varchar2(50),
      col_value varchar2(50));
    insert into vehicle_user_saved values ('Saved Report One','make','Toyota');
    insert into vehicle_user_saved values ('Saved Report One','make','Honda');
    insert into vehicle_user_saved values ('Saved Report One','model','Sedan');
    insert into vehicle_user_saved values ('Saved Report Two','make','Honda');
    insert into vehicle_user_saved values ('Saved Report Two','year',2010);And below is the source query for the region. The textarea value is initially set to null.
    -- Region Source for specifying query parameters.
    select
      col_label,
      apex_item.checkbox(1,'#ROWNUM#','CHECKED') as include_cols,
      apex_item.hidden(2,col_id)
      || apex_item.textarea(3,null,2,100) as filter_cols
    from
      vehicle_cols;When a user clicks the button to load the parameters for a report they have previously saved, I'd like to change the values in the textarea field from null to the saved values from the vehicle_user_saved table so the user can see the parameters and run the report, or modify the parameters if necessary.
    I thought I could run a PL/SQL process (After Footer) when the button is clicked to populate these textarea fields, but the test below doesn't do anything:
    begin
      apex_application.g_f03(1) := 'Hello';
    end;For example, when a user selects to load "Saved Report One," the following parameters should be loaded into the textarea fields:
    Column >> Filtered Columns
    Vehicle Make >> Honda, Toyota
    Vehicle Model >> Sedan
    Vehicle Year >> Null
    Vehicle Type >> NullCan someone help me out? I wouldn't think I need Ajax for this since it's ok to be processed after the button click. But if I do need to use Ajax, I definitely could use some help with it, as I've never used Ajax before. I've setup this example in my hosted account to help.
    Site: http://apex.oracle.com
    Workspace: MYHOSTACCT
    Username: DEVUSER1
    Password: MYDEVACCT
    Application: report parameters
    Thanks in advance!
    Mark
    APEX 4.1, Oracle 11g

    Hi, thanks for your response.
    I'm not adding any new rows, I'm just trying to change the values of the textarea fields in the tabular report when the user chooses to load his/her saved parameters. The default for the textarea field in all rows is null, because I assume users will want to start building the report from scratch. However, when the user clicks the button to load his/her saved values, I want to overwrite the null values with new values. How can I do that?
    Thanks,
    Mark

  • How to assign a default value on a Tabular Report?

    version 3.2.1
    I have a column in a Tabular Report (SQL Query (updateable report) ) that I would like to default to a value every time that the Add Rows button is clicked. This column needs to have the same value for every row.
    How do I set a default value on the column?
    Thanks,
    Joe

    I've run into the same problem. The 'Default' value isn't even appearing in the form, let alone getting stored.
    I'm not 100% certain (I'm still new to Apex too), but I think that the 'Default Type' and 'Default' value fields of the 'Tabular Form Element' might only apply to new records, ie when using the Tabular Form to create new records.
    In my case, I'm displaying existing records and I've been trying to enter a default new value for a particular field, ie change the value in the field for existing records from null to today's date. I couldn't get it to work and the more I think about it the more I realise that it is probably not the right way to do it.
    One alternative would be to put the SYSDATE into the source SQL (noting that changing an existing tabular form definition would cause an error, so I would have to create a new tabular form). But another (and I think preferable for me) option is to create a trigger that will put the SYSDATE into the field as each record is updated.
    Regards,
    Peter

  • Interactive Report validation error messages...

    Hi guys!
    I was looking for answer to this question for a long time now...is it possible to change the validation error messages in interactive report?
    With regards,
    PsmakR

    Hi,
    there are more validations than you think. Anthony Rayner has prepared a nice summary in a [url http://anthonyrayner.blogspot.com/2010/08/apex-40-enhancements-validating-form.html]blog post.
    You see in that post where and how to disable validations, but also, that you may not disable all of them. The only way to avoid all validations would be to implement the report yourself completely.
    The good news is, you can overwrite those messages. The following documentation tells you how to:
    http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/global.htm#CHDEDHBJ
    -Udo

  • Tabular Report Question

    Hi There,
    I am in the middle of developing a tabular report my report format is the following and following parameters are passed. Its basically a LEDGER of a particular account therefore requrired to calculate the opening balance as well.
    1. Account code
    2. Start Date
    3. End Date
    Account : 3301001
    Name : Bank of America
    Start Date : 01-01-07 ..................End Date : 01-12-07 ..................
    Acc_code.......Name ................Debit.........Credit...........Balance......................
    ...........Opening Balance of (Bank of America :)--------------> 800000 ..................
    1.................Company 1.........5000.............................805000.......................
    2.................Company 2.........2000.............................807000.......................
    3.................Company 3.............................12000.......795000.......................
    so based on that scenario I dont know how to do following things.
    1. I need to pick current balance from main accounts table and put it on balance field at first line where it says "opening balance of (bank of america)
    2. and add the balance into DEBIT or CREDIT which will act as a running balance.
    3. User can leave the End date so how to teckle this...following is the query.
    SELECT V_NO,VD_ENTRYDATE,V_VALUEDATE, ACC_CODE,ACCNAME,DEBIT,CREDIT FROM V_POOL
    WHERE ACC_CODE <> &ACCODE AND COMPANYID = '01'
    AND V_NO IN (SELECT DISTINCT V_NO FROM V_POOL WHERE ACC_CODE=&ACCODE AND COMPANYID=01 AND V_POSTED='T'
    and TO_DATE(VD_ENTRYDATE,'DD-MM-YY') >= TO_DATE(&SDATE,'DD-MM-YY')
    AND TO_DATE(VD_ENTRYDATE,'DD-MM-YY') <= TO_DATE(&EDATE,'DD-MM-YY')) order by v_no;

    Hi,
    try the following code for 2.
    DECLARE
        vError VARCHAR2(32767);
    BEGIN
        FOR i IN 1.. HTMLDB_APPLICATION.G_F03.COUNT
        LOOP
            IF HTMLDB_APPLICATION.G_F03(i) IS NULL
            THEN
                vError :=
                    vError ||
                    'Please enter a date on line ' || i ||
                    '<br/>';
            END IF;
        END LOOP;
        FOR i IN 1.. HTMLDB_APPLICATION.G_F04.COUNT
        LOOP
            IF HTMLDB_APPLICATION.G_F04(i) <> ^[[:digit:]]{8}$
            THEN
                vError :=
                    vError ||
                    'Please enter an account number on line' || i ||
                    '<br/>';
            END IF;
        END LOOP;
        FOR i IN 1.. HTMLDB_APPLICATION.G_F06.COUNT
        LOOP
            IF HTMLDB_APPLICATION.G_F06(i) IS NULL
            THEN
                vError :=
                    vError ||
                    'Please enter a quantity on line' || i ||
                    '<br/>';
            END IF;
        END LOOP;
        RETURN vError;
    END; BTW, are you sure that the regular expression "^[[:digit:]]{8}$" works that way in PL/SQL? Haven't used it very often yet, but I don't think you can specify it that way in PL/SQL.
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/

  • Tabular report hidden field error

    Hi there,
    I have a tabular report, and I have two fields which I am auto populating, I have currently set them to Display As Text, however, I would prefer to hide them, I have tried setting them to Hidden, but when I do, I get a SQL error when submitting the form, it appears that all the columns in the table have to be displayed in the tabular report for it to work. Does anybody know how I can hide the fields? I am using APEX 4.
    Thanks... Anil

    Hi
    Have you tried setting the column to not show (using the checkbox) in the report attributes instead (leaving its type as display as text)?
    I remember having to do something similar in the past but I don't have access to an install at the moment that I can test on...
    Cheers
    Ben

  • Tabular Form Validation - Save Correct Values

    I'm using Denes' example of tabular form validation. It finds the errors and displays the error messages, but I lose any values that were entered correctly. Do I need to use a collection to save them? I've been looking through older posts and one comment was that you'd only need a collection if you wanted to show the user the values they entered incorrectly. With Denes' logic it tells them what line had the error and what the original value was.
    DECLARE
      l_error   VARCHAR2 (4000);
    BEGIN
       FOR i IN 1 .. apex_application.g_f02.COUNT
       LOOP
          IF NOT TO_DATE (apex_application.g_f05 (i), 'YYYY')
                BETWEEN   TRUNC (TO_DATE (apex_application.g_f04 (i),'YYYY'))
                     AND  TO_DATE ('2008','YYYY')     THEN
                      l_error :=   l_error
                        || '</br>'
                        || 'Row '
                        || i
                        || ': Photo Inspection Year has to be greater than Date On Map and less than 2008 for '
                        || ' Map: '
                        || apex_application.g_f02 (i)
                        || '<br> Requested date: '
                        || apex_application.g_f05 (i);
          END IF;
          IF NOT TO_DATE (apex_application.g_f04 (i), 'YYYY')
                BETWEEN   TO_DATE ('1890','YYYY')
                     AND  TO_DATE ('2008','YYYY')     THEN
                      l_error :=   l_error
                        || '</br>'
                        || 'Row '
                        || i
                        || ': Date on map has to be between 1890 and 2008 for '
                        || ' Map: '
                        || apex_application.g_f02 (i)
                        || ' <br>Requested date: '
                        || apex_application.g_f04 (i);
          END IF;
       END LOOP;
       RETURN LTRIM (l_error, '</br>');Thanks,
    Susan

    It doesn't make sense to post your questions within a closed thread - start you own thread.
    It is possible to do that but you would need to save your data into a collection to keep the changes and display the error message on the same page.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

Maybe you are looking for