Tabular form on a huge view

Hello Experts,
I have implemented a tabular form on a huge view (about 300 million rows) in APEX 4.0. I then created custom items in the tabular form page for users to filter records and update them. The search would typically return few rows only. I have a instead of trigger for update on the view that will insert/update records to the appropriate table.
Now, when searcing a records and updating a record, the default MRU process seems to be going for a full table scan on the large table used in view. This is causing the page to hang and takes very long to update the row.
Please suggest a better way to implement this and to workaround the full table scan on the huge table. One option I am checking is to use APEX collections.
Thanks.

Hi,
without any details of your environment (OS, DB, Apex versions etc) and the query behind the view (SQL, explain plans etc), it is difficult to offer any information other than general guidelines. In short, the first things to do should be to treat this as a normal performance tuning exercise. Supply the required info and then the solution may be simpler than you think, possibly a simple rewrite of the query behind the view or maybe a new index, but until the info is supplied its impossible to say.
Regards
Andre

Similar Messages

  • Problem in tabular form based on dynamic view and pagination

    Hi All,
    I have a manual tabular form based on a dynamic view. The view fetches the records based on search criteria given by the user in all cases. But this view fetches ALL records when user clicks on pagination, without considering the search criteria. This is the problem I am facing.
    I am doing the following:
    Since tabular form does not support pl/sql function returning query, I cannot use a table directly. I need my results based on search criteria selected by user. Hence I created a dynamic view and used a "INSTEAD OF UPDATE" trigger to update the table.
    I use a set bind variables procedure, on load before header for setting the variables.
    This view fetches the correct data based on user search always. It creates a problem only in one situation, when using pagination in the report.
    The example can be found at:
    http://apex.oracle.com/pls/otn/f?p=19399:1:
    username = [email protected]
    pwd = kishore
    Here if "manager name" is entered as test, we get 5 records in "Summary of requests" report and 5 records in "Inactive Requests" report. When user clicks on Pagination in any of the reports, ALL the 7 records get fetched in "Summary of Requests" and 6 records in "Inactive Requests". How can I overcome this problem?? The report must consider the search variables even when pagination occurs.
    Is this because, the inbuilt "html_PPR_Report_Page" executes the region query once again by considering all search variables as NULL?
    Backend Code is at:
    http://apex.oracle.com/pls/otn/
    workspace: sekhar.nooney
    Username :[email protected]
    pwd: kishore
    application id = 19399
    My region code is something like:
    select *
    from regadm_request_v
    where access_type = :F110_REGADM
    and status <> 'INACTIVE'
    order by request_id
    My view code is:
    CREATE OR REPLACE VIEW REGADM_REQUEST_V
    AS
    SELECT *
    FROM REGREGOWNER.REGADM_REQUEST
    WHERE upper(employee_name) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_EMPLOYEE_NAME),'%')||'%'
    AND upper(manager_name) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_MANAGER_NAME),'%')||'%'
    AND upper(employee_sunetid) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_EMPLOYEE_SUNET_ID),'%')||'%'
    AND upper(manager_sunetid) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_MANAGER_SUNET_ID),'%')||'%'
    AND upper(request_date) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_REQUEST_DATE),'%')||'%'
    AND upper(USAGE_AGREEMENT_RECVD) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_USAGE_AGREMNT_RECVD,'~!@',NULL,REGADM_REQUEST_PKG.GET_USAGE_AGREMNT_RECVD)),'%')||'%'
    AND upper(STATUS) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_STATUS,'~!@',NULL,REGADM_REQUEST_PKG.GET_STATUS)),'%')||'%'
    AND upper(REQUEST_APPROVED) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_REQUEST_APPROVED,'~!@',NULL,REGADM_REQUEST_PKG.GET_REQUEST_APPROVED)),'%')||'%'
    AND upper(nvl(APPROVAL_DATE,sysdate)) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_APPROVED_DATE),'%')||'%'
    AND upper(APRVL_REQUEST_SENT) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_EMAIL_APPROVERS,'~!@',NULL,REGADM_REQUEST_PKG.GET_EMAIL_APPROVERS)),'%')||'%'
    AND upper(NOTIFY_APPROVED) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_APPROVAL_NOTIFICATION,'~!@',NULL,REGADM_REQUEST_PKG.GET_APPROVAL_NOTIFICATION)),'%')||'%'
    I would be glad for any suggestions.
    Andy/Varad any ideas? You both helped me a lot on my problems for the same application that I had faced before in More Problems in Tabular form - Please give me suggestions.
    Thanks,
    Sumana

    Hi Andy,
    The view and the package for setting bind variables work properly in my entire application other than the pagination. A pity that I came across this only now :(
    I have used this same method for holding variables in another application before, where I needed to print to PDF. I used this approach in the other application because my queries were not within the APEX character limit specified for the "SQL Query of Report Query shared component".
    In this application, I initially had to fetch values from 2 tables and update the 2 tables. Updateable form works only with one table right? Hence I had created a view. Later the design got changed to include search and instead of changing the application design I just changed the view then. Still later, my clients merged the 2 tables. Once again I had just changed my view.
    Now, I wanted to know if any method was available for the pagination issue (using the view itself). Hence I posted this.
    But as you suggested, I think it is better to change the page design quickly (as it would be much easier).
    If I change the region query to use the table and the APEX bind parameters in the where clause as:
    SELECT *
    FROM REGADM_REQUEST
    WHERE upper(employee_name) LIKE '%'||nvl(upper(:P1_EMPLOYEE_NAME),'%')||'%' .....
    I also changed the ApplyMRU to refer to the table.
    Here the pagination issue is resolved. But here the "last Update By" and "Last Update Date" columns do not get updated with "SYSDATE" and "v(APP_USER)" values, when update takes place. Even if I make the columns as readonly text field, I am not sure how I can ensure that SYSDATE and v('APP_uSER') can be passed to the columns. Any way I can ensure this? Please have a look at the issue here: http://apex.oracle.com/pls/otn/f?p=19399:1:
    I have currently resolved the "last update" column issue by modifying my view as:
    CREATE OR REPLACE VIEW REGADM_REQUEST_V
    AS
    SELECT *
    FROM REGADM_REQUEST
    I modified my region query to use APEX bind parameters itself as:
    SELECT *
    FROM REGADM_REQUEST_V
    WHERE upper(employee_name) LIKE '%'||nvl(upper(:P1_EMPLOYEE_NAME),'%')||'%' .....
    And I use the "INSTEAD OF UPDATE" trigger that I had initially written for update. The code is:
    CREATE OR REPLACE TRIGGER REGADM_REQUEST_UPD_TRG
    INSTEAD OF UPDATE
    ON REGADM_REQUEST_V
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
    UPDATE REGREGOWNER.REGADM_REQUEST
    SET MANAGER_EMAIL = :NEW.MANAGER_EMAIL
    , EMPLOYEE_EMAIL = :NEW.EMPLOYEE_EMAIL
    , STATUS_UPDATE_DATETIME = SYSDATE
    , USER_UPDATE_ID = (SELECT v('APP_USER') FROM DUAL)
    WHERE REQUEST_ID = :OLD.REQUEST_ID;
    END;
    Please let me know how I can resolve the "last update" column issue using the table itself. (Just for my learning)
    Thanks,
    Sumana

  • Tabular form on a view :ORA-01446: cannot select ROWID from, or sample...

    Hi,
    I have two tables
    CUSTOMERS
    ===========
    Name Null Type
    ======================
    CUST_UID NOT NULL NUMBER(4)
    CUST_NAME VARCHAR2(50)
    ITEM_PRICES
    ===========
    Name Null Type
    ======================
    IP_UID NOT NULL NUMBER(4)
    IP_ITEM_DESC VARCHAR2(50
    IP_COST_PRICE NUMBER(6,2)
    IP_SELL_PRICE NUMBER(6,2)
    I have a view IPS_VW which is the cartician product of CUSTOMERS and ITEM_PRICES, and an instead of trigger for UPDATE on this view which either inserts or updates data in the following third table
    ITEM_PRICES_SPECIAL
    ===========
    Name Null Type
    ======================
    IPS_UID NOT NULL NUMBER(4)
    CUST_UID NUMBER(4)
    IP_UID NUMBER(4)
    IPS_SELL_PRICE NUMBER(6,2)
    The following is my view
    SELECT 'A'||ROWNUM AS "IPSVW_UID",
    0 AS "IPSVW_IPS_UID",
    "CUSTOMERS"."CUST_UID" AS "IPSVW_CUST_UID",
    "ITEM_PRICES"."IP_UID" AS "IPSVW_IP_UID",
    "ITEM_PRICES"."IP_SELL_PRICE" AS "IPSVW_IPS_SELL_PRICE"
    FROM "CUSTOMERS" "CUSTOMERS",
    "ITEM_PRICES" "ITEM_PRICES"
    WHERE NOT EXISTS
    (SELECT 1
    FROM "ITEM_PRICES_SPECIAL" "ITEM_PRICES_SPECIAL"
    WHERE "ITEM_PRICES_SPECIAL"."IP_UID" ="ITEM_PRICES"."IP_UID"
    AND "ITEM_PRICES_SPECIAL"."CUST_UID" ="CUSTOMERS"."CUST_UID"
    UNION
    SELECT 'B' ||ROWNUM AS "IPSVW_UID",
    "ITEM_PRICES_SPECIAL"."IPS_UID" AS "IPSVW_IPS_UID",
    "ITEM_PRICES_SPECIAL"."CUST_UID" AS "IPSVW_CUST_UID",
    "ITEM_PRICES_SPECIAL"."IP_UID" AS "IPSVW_IP_UID",
    "ITEM_PRICES_SPECIAL"."IPS_SELL_PRICE" AS "IPSVW_IPS_SELL_PRICE"
    FROM "ITEM_PRICES_SPECIAL" "ITEM_PRICES_SPECIAL";
    And this is the instead of trigger
    CREATE OR REPLACE TRIGGER "TRG_IPSVW_UPDATE" INSTEAD OF
    UPDATE ON IPS_VW REFERENCING NEW AS N FOR EACH ROW
    BEGIN
    IF :N.IPSVW_IPS_UID = 0 THEN
    INSERT INTO ITEM_PRICES_SPECIAL
    ( CUST_UID, IP_UID,IPS_SELL_PRICE )
    VALUES
    ( :N.IPSVW_CUST_UID,:N.IPSVW_IP_UID, :N.IPSVW_IPS_SELL_PRICE );
    ELSE
    UPDATE ITEM_PRICES_SPECIAL
    SET IPS_SELL_PRICE = :N.IPSVW_IPS_SELL_PRICE
    WHERE IPS_UID = :N.IPSVW_IPS_UID;
    END IF;
    END;
    Everything works fine in SQLPLUS, if i update a rate in this view, a record is either inserted or updated in the third table.
    But when i try to create a tabular form based on this view, i get the error
    ORA-01446: cannot select ROWID from, or sample, a view with DISTINCT, GROUP BY, etc.
    Could someone help me please?
    Thanks,
    Allen

    I think The tabular form needs to be able to identify some primary key and using a rownum concatenation cannot provide that.
    Cheers
    Kofi

  • Apex Collection- Tabular Form

    Hi
    is there anyway to make a tabular form depends on apex collections, for example i have a collection named "Orders" and i want to add member to this collection by tabular form , is it possible?
    Thanks in advance

    Sure, build a manual tabular form
    SELECT APEX_ITEM.TEXT(1,AC.c001)
              ,APEX_ITEM.TEXTAREA(1,AC.c002)
    FROM apex_collections AC
    WHERE collection_name = <collection name>I can also think of an approach to get this working with a Wizard based tabular form(I haven't tried this before,but I don't see any reason why it shouldn't work).
    --Create a view referring the collection.
    --Change your tabular form to reference the view
    --Add insert,update and delete triggers on the view to handle those processes on the appropriate table(s).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Apex, Tabular forms and Nested Tables := Headache

    Hi All,
    I'm constructing an Apex aplication for Performance Reviewing staff and I have need of nested tables within each line item for ongoing comments during the year, the headings of which are drawn from another table, based on a template for which ones are to be used at any given time.
    I'd like to be able to use a tabular form to draw out the history of comments at any given time and modify them however I'm at a complete loss as to how to get this working with a tabular form in Apex. If anyone could point me at some good documentation on the subject or even suggest a better method to get this done I'd be very grateful.
    Thanks!

    Hi,
    Take a look at this article:
    http://www.oracle-base.com/articles/misc/ObjectViewsAndNestedTables.php
    First, create a view as described on your nested and other table(s), with 'Instead Of' triggers handling the DML. Next create the tabular form based on the view. You'll find many posts in the forum regarding building a tablular form based on a view.
    Paul Brookes.

  • Creating a Dynamic Tabular Form

    Hi Everyone,
    This is a question aimed at Denes Kubicek, but if he is not on the forum today then maybe someone else could help me.
    I am trying to create a tabular form on a table view. The thing is that the primary key is not populated using a trigger, the primary key is 2 varchar columns.
    For Example.*
    SVC_NAME
    SVC_HST_IP
    SVC_NUM
    SVC_DB_TYPE     
    SVC_APP_TYPE     
    SVC_APP_NAME     
    SVC_BK_TYPE
    So i am trying to create a tabular form based on the above columns, where the SVC_NAME and SVC_HST_IP are going to be inserted as the primary keys.
    I have seen on Denes Kubiceks APEX website that he has been able to create a tabular form which could meet my requirements, Tabular Form Dynamic. The only thing is that i am falling at the first step. Please could someone provide me with some direction as regards to where to put the code?
    What I have done to this point is place section 1 of the code "1. SQL Query / PL/SQL Function Returning SQL Query" in a report. However, when I run the page I get "failed to parse SQL query:ORA-00936: missing expression" error message. I assume that section 2 and 3 will be application processes but I have not got to that point yet. I am not sure about section 4.
    Any help would be appreciated,
    Thanks,
    -N.S.N.O.

    N.S.N.O.
    See this example on how to proceed with tables without a primary key:
    http://htmldb.oracle.com/pls/otn/f?p=31517:157
    which applies in your case. Using ROWID is also an option.
    Whatever later you call your primary key is not important since this example uses ROWID.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    ------------------------------------------------------------------------------

  • V4.0 - Tabular form ORA-01445: cannot select ROWID from, or sample,

    Hi
    I'm creating a tabular form in version 4.0.
    The select is based on three tables all of which have primary keys, and the keys are selected, but every time I run the page I get the following error:-
    failed to parse SQL query:
    ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table
    The query runs just fine in TOAD
    Any ideas?
    Thanks
    Mike
    select
    PRL.PERF_RATING_LINE_ID,
    PRL.PERF_RATING_LINE_ID PERF_RATING_LINE_ID_DISPLAY,
    PRL.BUSINESS_UNIT,
    PRL.EMPLID,
    ''''||PRL.REVIEW_YEAR REVIEW_YEAR,
    PRL.REVIEW_PERIOD,
    PRL.PERFORMANCE_SCORE,
    PRL.MODERATED_SCORE,
    PRL.HRM,
    PRL.COMMENTS,
    PBR.BU_DESC,
    ''''||PBR.DEPTID DEPTID,
    PBR.DEPT_DESC,
    PBR.EMPLOYEE_NAME,
    PBR.GRADE,
    PRL.SCORE_APPROVED_BY,
    PBR.TEMP_PERM,
    PBR.GENDER,
    PBR.JOB_START_DATE,
    decode(DECODE(SUBSTR(PBR.FLAG,1,5),'Job s',substr(PBR.FLAG,instr(PBR.FLAG,'~',1)+2,3)),
    'HIR','Hired','XFR','Transfer','REH','Rehire')||
    decode(SUBSTR(PBR.FLAG,1,30),'Job starts during period ~ XFR',' - '||substr(PBR.FLAG,instr(PBR.FLAG,'~',1,2)+2)) JOB_START_DETAILS,
    PBR.APPOINTMENT_DATE,
    SUBSTR(PBR.JOB_END_DETAILS,INSTR(PBR.JOB_END_DETAILS,'~',1,2)+2) JOB_END_DATE,
    SUBSTR(PBR.JOB_END_DETAILS,INSTR(PBR.JOB_END_DETAILS,'~',1,1)+2,INSTR(PBR.JOB_END_DETAILS,'~',1,2)-INSTR(PBR.JOB_END_DETAILS,'~',1,1)-2) REASON,
    PBR.JOB_GROUP,
    PBR.JOB_GROUP_DESC,
    PBR.JOBCODE,
    PBR.JOBCODE_DESC JOB_DESC,
    PBR.JOB_FAMILY,
    PBR.JOB_FAMILY_DESC,
    PBR.PBR_ID,
    MD.MGR_DEPT_ID
    from PERFORMANCE_BASE_REFRESH_V PBR,
    PERFORMANCE_RATING_LINE PRL,
    Y00_OPR_MGR_DEPT MD
    WHERE (PRL.BUSINESS_UNIT = PBR.BUSINESS_UNIT
    AND PRL.EMPLID = PBR.EMPLID
    AND PRL.REVIEW_YEAR = PBR.REVIEW_YEAR
    AND PRL.REVIEW_PERIOD = PBR.REVIEW_PERIOD)
    AND MD.OPRID = :APP_USER
    AND INSTR(':'||MD.DEPTS_MANAGED||':',':'||PBR.DEPTID||':') > 0
    AND MD.MGR_DEPT_ID > 0
    AND PBR.ADMIN_CENTRE IN
    (select c.deptid AC
    from [email protected] A,
    [email protected] C
    where A.ROWSECCLASS = C.ROWSECCLASS
    AND C.DEPTID != 'ZZZZ'
    and a.oprid = :APP_USER)
    AND (:P2210_BUSINESS_UNIT IS NULL
    OR PBR.BUSINESS_UNIT = :P2210_BUSINESS_UNIT)
    AND (:P2210_EMPLOYEE_NAME IS NULL
    OR INSTR(UPPER(PBR.EMPLOYEE_NAME),UPPER(:P2210_EMPLOYEE_NAME)) > 0)
    AND (:P2210_DEPARTMENT IS NULL
    OR PBR.DEPTID = :P2210_DEPARTMENT)
    AND (:P2210_PERFORMANCE_RATING IS NULL
    OR PBR.PERFORMANCE_SCORE = :P2210_PERFORMANCE_RATING)
    AND (:P2210_MODERATED_RATING IS NULL
    OR PBR.MODERATED_SCORE = :P2210_MODERATED_RATING)
    AND (:P2210_GRADE IS NULL
    OR PBR.GRADE = :P2210_GRADE)
    AND (:P2210_PERM_TEMP IS NULL
    OR PBR.TEMP_PERM = :P2210_PERM_TEMP)
    AND SUBSTR(NVL(PBR.JOB_END_DETAILS,'XXX'),1,3) NOT IN ('TER','TOC')
    AND PRL.SCORE_APPROVED_BY IS NULL

    Hi Marc,
    Thanks again for the quick reply and all the support the dev team is providing to us.
    Couple of question finally on this issue:
    - fixing the "copy page"/"copy validation" bug, our workaround - by making a page copy - we've found to use the standard validation on tabular form based on complex views will go away, right?
    - I made a sql trace when running the originally created tabular form page and I found the statement generated by the apex engine which gives the ORA-01446. Just wondering, would it be possible that apex is using the PK defined during the wizard instead of the rowid?
    - If not, would it be a possible enhancement request in the future to let the developer name the ROWID column optionally, and then apex will use that column as rowid instead of the ROWID? This can give flexibility for us as developers, in this case complex views (with instead of triggers) can be standard way supported. What I mean exactly is to create the above view in the testcase as follows (most of these cases there is always a base table in the view, and the rest of the tables are used as lookups, so I can pick up the desired ROWID in the view with an alias):
    CREATE OR REPLACE VIEW  CUSTOMER_ORDERS_V  AS
      SELECT cus.customer_id,
                cus.cust_last_name,
                cust_first_name,
                cus.cust_city,
                COUNT (ord.order_id) order_count,
                CUS.ROWID ROW_ID
           FROM demo_customers cus, demo_orders ord
          WHERE ord.customer_id(+) = cus.customer_id
       GROUP BY cus.customer_id,
                cus.cust_last_name,
                cust_first_name,
                cus.cust_city,
                CUS.ROWID;and then at design time, I could pick up the ROW_ID column as rowid, so all the rest of the functionality could work as working now on simple views and tables.
    What do you think on that?
    best regards,
    Peter

  • Tabular form. No data displayed

    Hi everybody,
    I have a tabular form which uses application items to query data. User enters the page from the first page that contains calendar by clicking on any date. If the date has any records assigned to it, the tabular form shows them for view/editing/delete. If no data found, it displays "No data found" message.
    I start a new session and get to the tabular form page by clicking on the date without any records. Then, when I return to the first page (calendar) and click on the date that has records assigned, the tabular form doesn't show any records. What is really weird, is that it even doesn't show "No data found" message. I see only the form header with column names.
    In debug I found the following info about the form:
    print column headings
    rows loop: 0 row(s)
    pagination
    All page elements, based on the same query are shown successfully, so the query, as well as item values are correct.
    Apex version: 4.0.2.00.07
    Please, help me to solve the problem!
    Elena

    Hello everybody,
    Just for the information, the issue has been resolved. The problem was in "Add Row" apex process that was used to generate a new row in a tabular form on a page load. As soon as I removed it from the page and created a dynamic action that runs javascript AddRow() function instead, all the records in the report have become visible.
    The conclusion: use this process "Add Row" carefully as it can behave in a strange way.
    Cheers,
    Elena

  • Stored procedures with view in tabular form

    Dears,
    i use apex 4.2 and database xe 11g , i have create tabular depend on view and i use stored procedures in process after computation and validation , the problem that view not update
    this tabular form query
    select
    "ROWID",
    "DOC_DET_ID",
    "DOC_ID",
    "MOV_QNTY",
    BATCH_DET,
    "ITEM_NAME",
    "UOM_NAME",
    "SIZE_NAME",
    "COLOR_NAME",
    "STOREG_BRCHAS_BATCHINTERNN",
    "EXPR_DATE",
    "PROD_DATE",
    AVL_QNTY,
    storage_code,
    "LOCATION_CODE"
    from "#OWNER#"."STORAGE_MOV_DET_VIEW"
    WHERE DOC_ID =:P117_DOC_IDthis a process that i use stored procedure in it
    DECLARE
       V_OLD     NUMBER:=0;
    BEGIN
       FOR i IN 1 .. apex_application.g_f02.COUNT  LOOP
          IF apex_application.g_f02 (i) IS NOT NULL THEN
             SELECT MOV_QNTY INTO V_OLD
              FROM STORAGE_MOV_DET
              WHERE DOC_DET_ID =apex_application.g_f02 (i);
               IF apex_application.g_f13 (i) >  V_OLD THEN
                 V_OLD :=apex_application.g_f13 (i)- V_OLD;
               END IF;
         ELSE
             V_OLD :=apex_application.g_f13 (i);
         END IF;
         if  V_OLD  <> 0 then
            GET_EXTRACT_PARENT_ITEM(apex_application.g_f04 (i) ,
                                   :P117_STORAGE_CODE ,
                                   apex_application.g_f12 (i) ,
                                   V_OLD);
        end if;
    END LOOP;
    END;when i use update this error i found
    Current version of data in database has changed since user initiated update process. current row version identifier = "A80CEBCFF06062F98D920BC75CB415AE" application row version identifier = "BCBA67120A87213D64EE059E10F3B15C" (Row 1)please help

    Do you still have the Apply MRU process running? I assume you do because otherwise you wouldn't receive the error message. Is the process you are talking about running before the Apply MRU process? It seems it does. Try chaning the execution sequence and run this process after the automatic MRU process.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Viewing complete employee information in the tabular form.....

    Hi all ...
    I have been asked by management to design a form in which they can view the following information of all the employees in a tabular form... STAFFNO,NAME,TYPE,NATIONALITY,POSITION,LOCATION,EVALUATION,APPROVAL NUMBER,... this info was previously available in MS-ACCESS now they want in oracle i forms..after the desiging of forms using the datablock wizard how hsould i proceed such that when i run my forms all the abv information of 800 employees are dispalyed.....

    page1-Welcome to data block wizard
    page2-Table or View, stored procedure.... I select table or view
    page3-i select the appropriate table... and the database item
    page4-congratulation u have decsribed ur DB
    page5-welcome to layout wizard
    page6-canvas:new canvas
    type:content
    page7-select the items to be displayed
    Item Type:text Item
    page8-prompt width and height
    page9-select form or tabular.......i select tabular
    page10-frame title:HD
    record displayed:10 & click on display scroll bar
    page 11_congrats
    page12-the form is displayed
    now when i run it.... i dont c the information displayed instead i c the fields for the items to entered and saved....!!!!!!

  • Create Tabular Form wizard - how to add rows to Table / View Owner list?

    Create Tabular Form wizard asks to choose "Table / View Owner"
    How to add additional schemas/users to this "Table / View Owner" dropdown list?

    Next step:
    I tried to create 2nd application - and it sees and allows to select from schemas I added in previous step.
    Then I tried to add 1 more schema - and 2nd application can't see it...
    I create 3rd application and select 1st schema (assigned when workspace was created) - and it sees only this one schema
    I create 4th application and select another schema (added in previous steps) - and it sees 2 schemas from 4 assigned
    what is this?
    how to live with it?

  • How to refresh page after selecting value from LOV item , in a tabular form

    Hi ,
    I have a tabular form, which contains 2 items(columns), of type "Select List - named LoV".
    Now, couple of issues here.
    1.
    2nd item(column) in tabular form, that LoV should get populated based user's selection value in first item LoV. So how do i refer to the value, that user selected in first item's LoV? I will have to use this reference in LoV query of my 2nd item ( on this tabular form)
    2.
    How can we refresh the page, when user selectes value in first item ( from LoV). As this is a tabular form, here item type is Select List, we dont have an option to pick item type as Select List with Submit. So problem is that when user selects value for item 1, refresh does not happen and item 2 LoV does not get populated as per user's selection in item 1.
    Please help here. Would be really appreciated.
    Thanks and Regards,
    Rave.

    Thanks Ben and Dan for your responses.
    Ben, your solution helped me with refresh of page, as page got submitted.
    This answers to my 2nd question. However, I still need to know first question, which basically is, how do i refer to the value, that user selected in first item LoV.
    Issue is, I selected the value in first item LoV, it got submitted and page fot refreshed. But after page refresh, first item LoV loses its value that I had selected last time. It does not retain the selected value after refresh.
    I have an unconditional process, that on every submit(refresh) of page, I set my items with their corresponding values. But problem is what do i mention there to refer to this item.
    I looked in view source of my page, this item is referred as f03.
    So i used "apex_application.g_f03", to set this item to its value, in my uncoditional submit process. But it did not work. I tried to refer this item as "f03" in this unconditional submit process. But still it did not help, the selected item loses its value after page refresh(submit).
    Any help here would be really appreciated. Please suggest how do we refer to this item's selected value.
    Thanks and Regards,
    Ravi.

  • Tabular Form: Conditional column based on another column in table/form?

    Hi!
    I have 4 columns in table A:
    number (the question number)
    question (the question to be asked)
    type (TEXT, LOV are the 2 valid values)
    answer (the answer with text or a selection from the lov table below)
    I have 2 columns in table B:
    number (the question number)
    values (a single value for the lov's)
    In table B there can be mutiple rows for each number. Table A and table B
    join on the number.
    I want to build a tablular form on table A where for each row either a text
    box or a select list is displayed depending on the contents of the type column.
    So row 1 would display a text box when the type value is text; row 2 would
    display a select list when the type value is lov.
    Is this even possible? How do I refer to the type column in the conditional for the
    answer column? I am guessing that I will need to have 2 answer columns one
    that displays when the type column is TEXT and one that displays when the
    type column contains LOV. This is OK. Setting up the conditional is display is the issue at this point.
    Hopefully I have explained this well enough! :)
    Thanks!
    Dave Venus

    Hi Dave,
    Sorry for not responding sooner - I finish work at 3pm GMT.
    I'll take your first question first (3:28PM posting according to my display - not sure if you are on GMT time?):
    As far as I understand it, using the select_list_from_query() function generates the options that are required in the select list as HTML tags. Each instance of this function should create a SELECT tag and the results of the query should generate one or more OPTION tags within it.
    Second question (4:20PM posting):
    The HTMLDB_ITEM functions are listed in the documentation - here's a link to the online version:
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14303/api.htm#sthref2524
    Most of the examples that I have seen have been on this forum - simply search for HTMLDB_ITEM or one of its functions.
    I tend to leave the generation of tabular forms to the wizard as much as possible. The only exceptions are when I need to have access to more than the Primary Key for a row but don't want to show the field on screen. There are examples on the forum about concatenating the HTMLDB_ITEM functions into a single value - this hides ID fields from the user but makes them available to PL/SQL code.
    Third question (5:29PM posting)
    I did try using DECODE in my questionnaire but not for the feature that you needed. Originally, I wanted to use this to display one of a number of different fields (ie, my date, number or string field as appropriate to the question) but this didn't help as I couldn't get back to the right field during the update. If you have decode working for the select lists, then that's great!
    The first column should be hidden or sitting behind a checkbox as this should be the Primary Key for the row and should not be editable by the user nor would it normally be displayed.
    As long as your select statement creates the correct output (albeit that you may need to work on the layout!), you should have an updatable form. However, you will need to have the MRU processes in place and the appropriate buttons that trigger these. When I did my questionnaire, I created the form using a wizard to get all of the processes and buttons and then changed the select statement. If you haven't got the processes and/or buttons, we can go through adding these onto your page.
    Last question (9:08PM posting)
    As explained above, column 1 should normally be hidden. The INPUT tag you detail above is what I would expect to see. The value="6" attribute indicates that 6 is the Primary Key for that row - every row will have the same tag but different values for the "value" attribute. So, if it is hidden and these are the tags you see doing a View Source on the page, then everything is correct.
    OK. So now we have the data on screen and (hopefully?) we have the correct processes and buttons on the page.
    The next step would be validation and update of the data.
    Validation of the data can be handled by a normal page process - I can let you have example code if you want to validate the data (this will also explain how to loop through the rows - there are also methods that you can use to do this in javascript if you want). Updates should be handled by the processes and buttons on the page - again, if you haven't got these we can go through adding them in (although, if you haven't yet formatted your page, you may find it quicker to copy your select statement and create the page again using the same select statement).
    ORA-20001 errors are user defined errors. Do you mean the "data has changed" errors? If so, you will probably need to include the MD5 checksum functionality (it's shown in the document linked above).
    Finally, we'll keep this thread going so that you have all of your workings and my responses in one place, if that's ok with you?
    Regards
    Andy

  • Bug in Tabular form Not Exist Validation, fails when creating multiple rows

    Hi,
    I have a Not Exist validation created for a Tabular form:
       select 1 from my_table where col1 = :col1 and col2 = :col2Execution State: For created and Modified Rows
    which is working fine when a row already there in DB
    and I am trying to enter a new row with same data.
    but when there's no data and I enter two rows with same data, validation does not fire, first row should allowed to enter
    but for second row it should give error that data already exists, which is not happening.
    for example,
    let's say I have a row in DB with: 1, 2, 3
    when I try to add a new row with same data ie. 1, 2, 3 validation fires and showing error, which is fine.
    but let's say there's no data in DB and I am entering two rows with:
    1, 2, 3
    1, 2, 3
    validation is not working this time, it is allowing to enter both the rows.
    do I need to create a manual validation for this or what?
    Apex 4.1.1.00.23
    Regards,
    Tauceef
    Edited by: Tauceef on Dec 6, 2012 10:09 AM
    Edited by: Tauceef on Dec 6, 2012 11:22 AM
    Edited by: Tauceef on Dec 6, 2012 11:27 AM

    Hello Tauceef,
    >> Now I got it, I was under impression that it will validate one by one row before insertion,
    >> but it's going to check all the rows first, then do the insertion.
    Just to clear things up, the APEX engine works exactly as you describe, but this is your problem.
    The APEX engine do check\validate all the rows first, one row at a time, and only if all the rows pass validation, the DML processes kick in. The DML processes work on the entire Tabular Form record set (per page view, of course).
    In order for your type of validation to work (the one that queries the database), as you want it, the validation and DML actions have to run together, row by row. This is not how things work, because it’s less efficient/optimal, and may lead to a situation where a certain row can fail validation, but other row(s) already been inserted/updated/deleted into/from the database. This could be a very tricky situation.
    Vikram has suggested to rely on a database constraint, and control the APEX error message. This is possible, although I’m not sure that in this case, the Tabular Form will retain all the user changes, in case of validation error. You should check it.
    Another option, which Marc hinted on, is to manipulate the G_Fxx arrays. In your case, you should loop through the new rows, compute their MD5, and make sure that all the rows have different MD5 values. This is on top of the current validation, which makes sure that the new rows do not already exist in the database.
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

  • Passing Session Values to the Tabular Form Element of a Report Column

    Hello,
    I'm running application express version 2.0 with a 10.2.0.2.0 database on a 32 bit windows box. I'm trying to figure out sneaky a way to pass the &APP_PAGE_ID., #APP_PAGE_ID# or V('APP_PAGE_ID'); as an element attribute of a Report Tabular Form Element set to display as a Select List (named LOV).
    It seems that whatever option I choose, the Element Attributes field will only render the literal value of what I have entered. This is part of the solution but I would like to find a way to pass the current page id.
    What I'm trying to do is utilize the ONCHANGE attribute to redirect to a report page in my application when the value from a Select List (named LOV) is selected.
    I could work around this by creating my own table output with PL/SQL and HTP.P commands but would really be interested in finding out if I can use the reporting structures which are already available through Application Express.
    Any ideas?
    Thanks.
    Justin.

    Thanks for the response Earl. To clarify this is what I've done and what I hope to achieve:
    I currently have a LOV for my application that identifies a number of database report types: DB Options, DB Parameters, DB Version, and so on.
    I have an application express report being generated for the databases I'm monitoring and it displays as follows:
    - HOST -- DBTYPE -------- DBNAME - DBREPORTS
    =====================================
    - SVR 1 - Oracle 9.2.0.1 - DEV -------- [LOV HERE]
    - SVR 2 - Oracle 9.2.0.7 - TST --------- [LOV HERE]
    I am displaying the LOV on my report the the options under the reports attribute tab in my application builder. I insert my LOV select list by editing the DBREPORTS column and set the "Display As:" option under Tabular Form Element to "Select List (named LOV)"; I have also added my LOV to the "Named LOV" option under List of Values.
    So far this achieves everything I would expect and works quite well (a select list with my report types appears in my monitor report for each DB that is returned).
    What I'm interested in doing now is opening a DBREPORT for a given database by simply choosing the report type from my LOV. I can set the "Element Attributes" option under Tabular Form Element to execute a javascript call for any valid event (in my case I'm using ONCHANGE).
    My only issue is that I cannot find a way to pass any session values from my page to my Element Attribute. If, in the Element Attributes field I enter:
    onchange="alert(this.value);" //my dialogue box will display the value of my current selection when I choose a report type.
    What I'd love to be able to do is something like:
    onchange="alert('&APP_PAGE_ID.');" //so my current page id is written to the element.
    Unfortunately, only my literal text seems to be rendered. Rather than having my dialogue come back with my page number, say 75, I receive the literal value &APP_PAGE_ID.
    Notwithstanding any quote issues, I've tried to dump a test html attribute to my source html by entering any of the following in the Element Attributes field:
    test=&APP_PAGE_ID.
    test=#APP_PAGE_ID#
    and as a shot in the dark knowing that I'm not using PL/SQL:
    test=V('APP_PAGE_ID');
    In every case when I view source I see the literal value of what was entered in the Element Attributes field (ie "test=&APP_PAGE_ID." instead of "test=75").
    What makes things a little more frustrating is that I can drop &APP_PAGE_ID. into the Column Heading field (ex My Heading &APP_PAGE_ID.), it renders as I would expect; "My Heading 75". If we could find a solution to this, I could see a number of slick uses for this type of functionality.
    Hope this helps,
    Thanks.
    Justin.

Maybe you are looking for

  • SUP 2.2.5 + Offline BAPI Error Handling

    Dear All, Following is my Offline Transaction scenario where I require help. Use Case: MBO created on a Z BAPI that is Creating a GR (Goods Receipt) in SAP ERP. BAPI output contains Error Return Table as well that helps us in finding any error that i

  • Can we manually give value to value fields in COPA?

    Hi Friends, Due to restrictions in COPA, we are not able to pass some values in to COPA value fields automatically, but this data is available in tables related to FI, can we pass this data in to COPA manually. If possible can you tell me the procedu

  • Help- I have no idea how to use this program.

    Hi All, I am really at a loss at the moment. I am hoping to create a flash document for work in order to present an idea I have. What I am basically wanting to do is to create an interactive workbook for clients on occupational health and safety. The

  • Trying to register iPhone 4. iTunes store says its busy and cannot connect, try again latter.

    Trying to register new iPhone 4 for the first time. iTunes store says its busy and cannot connect. I have tried many times over 2 days but no luck. What can I try.

  • CS4 video effects

    In Premiere CS4.1, I am now working on color correction (using basic Adobe RT effects).  In effects control, after I have the proper effect settings, as soon as I lift my finger off the mouse the clip goes back to the original colors.  This happens w