View and Form 2

Hi Pete and all,
Sorry for the delayed response, as I have lots of workloads lately.
Anyways, here is my Apex test online.
http://apex.oracle.com/pls/apex/f?p=56613
login: test01
password: abc123
ws: dev_ws_100
create table test (name varchar2(100));
insert into test values ('BARACK OBAMA');
create view test_vw(fname,lname) as select regexp_substr(name,'[^ ]+', 1, 1),regexp_substr(name,'[^ ]+', 1, 2) from test;
select * from test_vw;
FNAME    LNAME
BARACK   OBAMA
Then I created an apps page "Form with Report" based on the TEST_VW.
When I insert new rows in the form page, I got error
1 error has occurred
ORA-01733: virtual column not allowed hereHow can I use the table TEST instead of TEST_VW in the form page?
I mean the report on a form will use TEST_VW (view) on the report page and would use TEST (table) on the FORM/UPDATE page.
Plese help....
Thanks,
Kinz

Yikes!!! There is something wrong huhuhu :( when I tried to click the update botton and update the first row , change the first name 'JOHN' to KIRAN, all the succeeding rows is updated to same value. And every other row you query and click update without changing anything with force update as such :((
Kindly debug the issue please....Thanks.
Can you please check if you can use this note courtesy of Pete Mahon:
See what you think of the code below. The beauty of this is that you can change your view and your api as much as you like without affecting the calls your apex application makes, so long as you retain your primary and foreign keys. If you do make a change to the view, you will need to recompile your trigger also. I've only demonstrated for DELETE - you can do this virtually the same for INSERT and UPDATE also.
create table a (a_id int, a_text varchar2(20));
create table b (b_id int, ref_id int, b_text varchar2(20));
begin
insert into a values(1,'Alpha');
insert into a values(2,'Charlie');
insert into a values(3,'Echo');
insert into a values(4,'Golf');
insert into b values(1,1,'Bravo');
insert into b values(2,3,'Delta');
insert into b values(3,3,'Foxtrot');
insert into b values(4,4,'Hotel');
end;
create or replace view a_and_b
as
select a_id
      ,a_text
      ,b_text
from  a, b
where a_id = ref_id (+);      
create or replace procedure a_and_b_delete_api (p_id in int)
is
begin
dbms_output.put_line('p_id is '||p_id);
delete from a where a_id = p_id;
delete from b where ref_id = p_id;
end a_and_b_delete_api;
create or replace trigger a_and_b_t
instead of delete on a_and_b
for each row
declare
begin
a_and_b_delete_api
(   :OLD.a_id
END a_and_b_t;
delete from a_and_b where a_id = 3;
select * from a_and_b;

Similar Messages

  • What the difference between Canvas,View and Form

    hi
    What the difference between canvas and view and form
    why asking becoz i find form builder reference
    built in like FIND_CANVAS
    FIND_VIEW
    FIND_FORM
    What the difference between these 3
    thanks in advance
    prasanth a.s.

    Asuri - with all these questions you are posting it looks like you are sitting and exam or an interview. The best advice I can give you is the skill of being able to research answers yourself.
    I would encourage you to get familiar with the online help and the various documents on OTN - this will give you knowledge; not just answers.
    Regards
    Grant Ronald
    Forms Product Management

  • View and Form

    Hi All,
    Apex 4.0
    I have created a page (form with report) based on a complex View. So when time to create or update the form it wont allow me :(.
    How do I point or change the form to point to the table instead of the view at "create"/"edit" module?
    Thanks a lot,
    Kinz

    See what you think of the code below. The beauty of this is that you can change your view and your api as much as you like without affecting the calls your apex application makes, so long as you retain your primary and foreign keys. If you do make a change to the view, you will need to recompile your trigger also. I've only demonstrated for DELETE - you can do this virtually the same for INSERT and UPDATE also.
    create table a (a_id int, a_text varchar2(20));
    create table b (b_id int, ref_id int, b_text varchar2(20));
    begin
    insert into a values(1,'Alpha');
    insert into a values(2,'Charlie');
    insert into a values(3,'Echo');
    insert into a values(4,'Golf');
    insert into b values(1,1,'Bravo');
    insert into b values(2,3,'Delta');
    insert into b values(3,3,'Foxtrot');
    insert into b values(4,4,'Hotel');
    end;
    create or replace view a_and_b
    as
    select a_id
          ,a_text
          ,b_text
    from  a, b
    where a_id = ref_id (+);      
    create or replace procedure a_and_b_delete_api (p_id in int)
    is
    begin
    dbms_output.put_line('p_id is '||p_id);
    delete from a where a_id = p_id;
    delete from b where ref_id = p_id;
    end a_and_b_delete_api;
    create or replace trigger a_and_b_t
    instead of delete on a_and_b
    for each row
    declare
    begin
    a_and_b_delete_api
    (   :OLD.a_id
    END a_and_b_t;
    delete from a_and_b where a_id = 3;
    select * from a_and_b;

  • View based form updation in 6i and 10g forms.

    Hi All,
    I am facing a strange problem.
    I created a form based on a view, which is based on a single table. i made a copy of the form and converted it to 10g.
    When running in 6i, i can update the data through forms. But in 10g, its showing FRM-40602: Cannot insert into or update data in a view.
    Can anyone tell what is wrong?
    Thanks & Regards,
    Manu.

    hi Manu
    How to insert new record or update existing record using a complex view?
    to make dml against a complex view with instead of triggers a reality. There should be no need to write an on-update trigger in your form. Indeed, the reason for a view and instead-of-trigger on that view is so that you do not require additional coding in your form.
    1) you need the instead-of-trigger on the view (confirm it is there)
    2) you need to change the locking mode in the form for the block based on your view so that it uses the logical key for locking purposes. There is a lock mode setting somewhere in the block properties page, find it, understand the differences and pick the righ tone (I forget at this moment which on it is, try them all if necessary).
    3) #2 will involve selecting those fields that map to the business identifier/primary key you want to you use for finding rows. You need to visit each field's property page and set the appropriate attribute to indicate that is is part of the key used to find rows. It is there on the properties page but not having forms available at the moment I cannot give you the property name. You will have to do a little exploring to find it.
    If you do these things, the error should go away and the view become updatable via oracle forms without the need to write any on-update trigger.
    Do some testing at the database level first. Make sure you can update the view directly via sqlplus first with the instead-of-trigger before you attempt it in the form. This will ensure that your issue is forms related and not database related. This is an important step because the database will return a similar error to what you have reported if the instead-of-trigger does not exist on the view.
    sarah

  • View application pages - view forms views and application pages. enumerate lists

    view application pages - view forms views and application pages. enumerate lists, if we disable this permission in sharepoint then user gets blocked from getting into application pages which is good. But now I have few list view web parts on a page and user
    is not able to see those reports based on view. It shows working on it. As soon as I enable view application pages permission it works.
    I need a permission level -view forms views only.
    MCTS Sharepoint 2010, MCAD dotnet, MCPDEA, SharePoint Lead

    Hi Amit,
    SharePoint has a feature called “ViewFormPagesLockDown” at site collection scope. After enabling the feature, all groups / users not having the “View Application Pages” permission will not be able to navigate to pages like “_layouts/viewlsts.aspx”
    or “pages/forms/allitems.aspx”.
    So, for your issue, please disable the ViewFormPagesLockDown feature via PowerShell command:
    $lockdownFeature = get-spfeature viewformpageslockdown
    disable-spfeature $lockdownFeature -url [the URL of your site]
    More information:
    http://sharepointtechie.blogspot.jp/2011/06/blocking-access-to-application-pages.html
    http://sureshpydi.blogspot.jp/2013/12/viewformpageslockdown-feature-in.html
    Best Regards,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • 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

  • Access 2010 on 64 Bit Windows 7 Access "Not Responding" when changing from forms view to design view and back

    I am running
    Windows 7 64 bit
    Access 2010 32 bit
    Developing an application with a split FE BE with both files local but continue to have the message "Not Responding" when switching from forms view to design view and back as well as if I try to connect to a subform or object on the sub form.

    I have seen this behavior when the form's RecordSource is a complex query such as a crosstab or a query with several nested queries. To test if this is your case, remove the RecordSource and see if the form starts acting normal again.
    Then again, if the form has several subforms they might be slowing up the loading time.
    Bill Mosca
    www.thatlldoit.com
    http://tech.groups.yahoo.com/group/MS_Access_Professionals

  • Acrobat X form editing view and normal view

    This might seem like a silly question, but I went into form editing mode to create some form fields. I can toggle back and forth between form editing and form preview views, but can't figure out how to get back to normal view. In Acrobat 9, when in form editing view, there was a button in the upper right corner "Close Form Editing" -- where did that button go?

    Agree. No button/option available to return to normal view. My version is 10.0.1
    Workaround:
    1. select View menu > Full screen mode or press Ctrl+L
    2. press Esc* key
    * when Edit > Preferences > Full Screen (category) > Full screen navigation > 'Escape key exits' is selected

  • Viewing and printing form

    Is there a way to view (and print) my form in the same format that they are submitted? I only seem to be able to view all responses in a table format.

    You can save a response as a PDF (with the original form layout).
    This tutorial explains: http://forums.adobe.com/docs/DOC-1383

  • I am trying to open a website that is using Microsoft content viewer, and the page does not show. Any ideas on how to view this site using firefox. It works on IE.

    I am participating in an online class whose website uses Microsoft Content Viewer to view the class content. The browser opens a new page, but nothing is there. At the top of the tab it says Microsoft Content Viewer, and nothing else. Can anyone tell me how to view my course using Firefox? I would prefer not to use IE, but it works there.

    When originally creating the pdf, you would need to choose another pdf conversion setting. In Word if you use the pdf menu, change your settings there: Adobe PDF > Change Conversion Settings. I would use High Quality Print instead. If you use the File > Print method, click the Properties button next to the Adobe PDF printer selection.
    For your already created form, you can change the file so your users will not encounter issues. In Acrobat 9, which hopefully is similar in process to 8: Advanced > Preflight > Profile tab > PDF/A compliance > Remove PDF/A information.(You'll have to unsecure your form first).
    You can read about PDF/A files in the Help.

  • Accessible PDF files and forms

    I am beside myself with the lack of help and/or interest in the Accessiblity area. We have been mandated to make all our PDF files accessible on our Web site. We have been able to master many of the issues regarding tags and form fields, but still have questions regarding updating the original PDFs without loosing the tag structure.
    Is there any options on the Adobe site that may concentrate on this area? I called tech support yesterday (Bronze contract), was on hold for 10 mins and got disconnected. After leaving my number, they never called me back again.
    HELP
    KEN PANTHEN, Albany, NY

    Bill
    The point was not having to create the tags again in a new file before
    replacing the pages containing the form fields in the old file. We have
    many forms that get updated right up to the last minute and to go through
    the tagging process is too time consuming. We do not use PDF Maker, but
    produce all the PDFs directly out of InDesignCS3 to Adobe Acrobat
    Professional (Distiller).
    Thanks for your reply.
    KEN PANTHEN
    NYS Tax Department
    Information Technology Specialist 2
    FPM - Composition Services Unit
    (518) 457-1425
    (518) 485-7828 (fax)
    From:
    "Bill@VT" <[email protected]>
    To:
    Kenneth Panthen <[email protected]>
    Date:
    06/24/09 11:19 AM
    Subject:
    Accessible PDF files and forms
    I am really suggesting replacing all of the pages. I was thinking that the
    tag structure would go with the replacement and you would need to create
    the other PDF with PDF Maker to keep the tagging. I may be wrong, but that
    was the view I had. If you replace a single page, I am not sure what might
    happen since that would generally not be done with PDF Maker.
    Since you already have the application process going, it is probably
    easiest for you to try the variations on replacing pages and such --
    basically what I would be doing.

  • 10.6 iCal week view and mini calendar are out of sync-how to fix?

    How does one re-establish "sync" between the large window week view and the small mini calendar month view displayed on the lower left side? Mine is out of sync by a month. Thanks!

    Are they off by always the same amount of time or they drift apart over time?
    If the former, you may try a quick adjustment, though it is a manual affair. Control-click on the clip in the browser, choose "Open in Timeline" and try moving the audio to match.
    If I remember correctly, DV tape audio could be recorded in 32KHz or 48KHz. The latter is the one that should be used, always.
    Maybe this one was recorded at 32KHz?

  • Why my tracks are not shown in Album view and Artist view, only Album Artworks are shown???

    Dear,
    I have not have this problem in the previous version of iTune. As soon as i upgraded it to iTunes 11, it happens.
    The problem in here is all my songs, tracks are still here, i can see all of them in "songs view". However, when i change the view to Album View, and click into the Album artwork, there is no track there. When i double click into the Album Artwork, the first song of the album will be played normally.
    Same story to the Artist View. Only the Album Artworks are shown and the rest is completely blank.
    I have absolutely no idea what is going on here and obviously i am not satisfy with this new version.
    Is there any way for me to fix this problem? Please help!
    Otherwise i will need to use other software for music playing.
    Regard,

    Refer this article
    The Microsoft.SharePoint.SPFieldCollection.AddFieldAsXml method
    http://blogs.msdn.com/b/sharepointdev/archive/2011/01/20/why-do-my-new-list-fields-not-appear-on-the-new-edit-or-display-forms.aspx
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Master on a View and Detail on a Table

    I have a master form and a detail tabular form attached to it - together, on the same page. Form is based on a view and the tab form is based on a table. Whenever an update needs to be done, then on the tabular form - detail record.
    If I try to create a new detail record it works fine and saves it. If I want to delete it is fine as well. The only thing that doesn't work is applying changes to an existing record. It fails with the following message:
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "9F37DC19F8CD77C45A33036B7E423248", item checksum = "30DA90A7EFF6043FDCBB542183ACE8BA"., update "DEVELOPER"."SYN_LOG_MANIFOLD_PLANING" set "PRIMKEY" = :b1, "ORDER_NUMBER" = :b2, "S_GROUP" = :b3, "MANIFOLD_SHAPE" = :b4, "LENGTH" = :b5, "WIDTH" = :b6, "HEIGTH" = :b7, "NOZZLE_QTY" = :b8, "NOZZLE_TYPE" = :b9, "ZYLINDER_QTY" = :b10, "ZYLINDER_TYPE" = :b
    I think I have seen this befor, but still couldn't find the answer. Any ideas?
    Denes

    Got to answer my own question myself.
    I found the problem to be in a column included in the tab form. In the report atribute it was set to hideen. However, in the properties of the column it was still saying Tabular Form Element / Display as: Date Picker...... Usually no problem. But in my case, this column is updated by an on insert trigger, which inserts the record creation date. I assume that this is the reason why the error popped up when I tried to update the record. As soon, as I removed the column from my query or set it to hidden, my form was working.
    Denes

  • How to update or delete records in a Complex View in Forms?

    Hi,
    I have a requirement to create a Form by using Complex View. Insertion is possible but updation and deletion is not working properly . I got FRM-40501 Error. I need How to update or delete records in a Complex View in Forms?
    Thanks & Regards,
    Hari Babu

    Depending on how complex your view is, forms is not able to determine how to appropiately lock a record, when you try to update or delete a record.
    One approach to using complex views in forms:
    1. Set the Key-mode of the block to "Non-Updateable"
    2. Mark the column which can be used to build the WHERE-condition to uniquely identify a record with "Primary Key" = "Yes"
    3. For doing INSERT, UPDATE and DELETE, create an INSTEAD-OF-trigger on the view.
    4. Create your own ON-LOCK-trigger in forms which does the locking of the records to update.

Maybe you are looking for