TAB CANVAS PROBLEM

hiiii
in one of the tabs in a TAB CANVAS ... am trying to insert some fields into a table .. a simple insert statement ... BUT in each time i got in the message bar(UNABLE TO INSERT RECORD)
and when i disply the error i got (ORA-00001: unique constraint (DIZZYLAND.ADMINS_PK) violated) ... the strange thing is that
am not trying to insert in this table (ADMINS) ...
AND the alert() appears ???!!!!!
here is the procedure that is called in WHEN_BUTTON_PRESSED trigger
PROCEDURE SEND_EMP_STD_COMM IS
std_f_name varchar2(50);
std_l_name varchar2(50);
std_id NUMBER(4,0);
ALERT_ID number;
BEGIN
select SID,F_NAME,LAST_NAME into std_id,std_f_name,std_l_name from student where user_name= :TEXT_ITEM777;
     insert into STUDENT_COMMENTS(
     SID,
     SENDER,
     SENT_DATE,
     COMMENT_TEXT,
     USER_TYPE
     values(
     3,
     :ADMIN_COMMENTS_BLOCK2.TEXT_ITEM776,
     TO_DATE(sysdate, 'DD-MON-YYYY HH24:MI:SS'),
     :ADMIN_COMMENTS_BLOCK2.TEXT_ITEM778,
     'A'
     commit;
     set_alert_property('CONFIRMATION_ALERT',alert_message_text,'Comment Has Been Sent Successfully To '||std_f_name||' '||std_f_name);
     alert_id:=SHOW_ALERT('CONFIRMATION_ALERT');
END;
*******************************************************************************************

Consider the usage of the commit statement.
It is possible that you are displaying the data in a form which is in insert mode.
When you issue commit, the program may be trying to insert the data twice. Once at the form level and again at sql level. You can determine this using debug with a breakpoint set at the button press.
My personal preference is to used forms_ddl( 'commit' ) to commit sql code and commit_form for forms. Generally, I avoid mixing the two when possible, for the reasons you describe.

Similar Messages

  • Tabbed canvas problem

    hello,
    how can i hide/show tabbed pages depending on if a user has an instructor_id?
    Here's what i've done:
    IF :students.INSTRUCTOR_ID > 0 THEN
    SET_TAB_PAGE_PROPERTY('CLASS_LISTS', VISIBLE, PROPERTY_TRUE);
    ELSE
    SET_TAB_PAGE_PROPERTY('CLASS_LISTS', VISIBLE, PROPERTY_FALSE);
    END IF;
    The pages don't show regardless of the value in the instructor_id column.
    Can u help?

    which trigger are you running the code in? Maybe that's why the code works in once place and not the other?
    I would think a WNFI trigger

  • Focus problem in TAB Canvas form

    Hi
    I am calling FormB from FormA by using
    CALL_form('FormB.FMX',NO_HIDE);
    But when I click on the any other field ( other than the first field in the called Form ), the screen is becoming blank, again I need to click on the Execute Query button, but after that I can click on any other field it wont go invisible.
    FormB has TAB canvas
    Oracle & Form Version Oracle 10g
    THanks in advance

    Hi,
    When I run the form directly also I am getting the same problem,
    Hi Tony,
    <<Define what's blank??? Errors???? >> means , I need to click on the execute query button to see the data, even to see the controls in the forms.
    As I said, i am calling this form from another form, and I am assign the values in the prequery, I am gettign the result propery, but when I click on any other control, the form become empty, I need to click on exec query to see the values and tex items etc.
    This form has one content canvas and one tab canvas.  What are the properies to set to place tab canvas on the content canvas.

  • Problem using tab canvas

    I am creating a form which has 2 canvases . The first one is a content canvas . The second one is a tab canvas . The problem is that at run time ,I need to click the "next block" button to get the tab canvas . It should have appeared below my content canvas to be correct . What do I need to do to solve this problem ? Thanks.

    How did you create your canvases? Did you create them separately and then through the properties of the Tab Canvas tell it where to be displayed? If so, this could be problematic. The best option I've found is to create your content canvas and then - using the Tools pallet on the left of the canvas screen - select the Tabbed Canvas button and draw the tabbed canvas on the content canvas. This ensures your tabbed canvas "fits" properly on your content canvas and gets displayed automatically during run-time.
    If this doesn't solve the issue, let us know a bit more details about how you created the canvases and we should be able to help you figure out a solution.
    Craig...

  • Tab canvas with required fields (problem)

    hi,
    I am using tab canvas with 5 tabs with diff blocks.
    receive
    issue
    adjust
    return
    view
    some fields are required in all tabs.
    when i run the form and in RETURN TAB and enter some data and click the save button the cursor goes to receive tab and focus the required fields with a message
    FIELD MUST BE ENTER
    same for issue tab also...
    i dont want to enter any thing there ..
    how i manage it
    thanks

    Not sure if I understand you correctly. You say some fields are required in all tabs, but also that you 'don't want to enter anything here'. Do you mean that the fields are required, but only if you're entering data on that specific tab? I.e. you don't have to enter all of the tabs.
    If that's the case, are all the tabs based on the same block, or different blocks?

  • Tab canvas on a content Canvas

    Hi,
    I need to put a tab canvas on a content canvas in 10g R2.
    and have items from the same data block distributed across the canvases.
    I have set them up with the appropriate viewport for the tab canvas, but at runtime, the tab canvas does not appear untill an item on it gets the focus.
    Both canvases are set to the same window.
    I'm sure this is possible and I think I have done it before but for some unknown reason can't seem to remember how !.
    Thanks in Advance
    Regards,
    Tony Garabedian

    Hi Steve,
    Yup, it is definitely related to the window, if the window is the form's console window and the window is the first window created in the form (default window created with the first canvas mostly WINDOW1) the tab canvas is behaving in that way.
    Create a new window and make sure that this window is not the console window and the behavior is very much normal, the tab canvas appears as soon as the window gets focused.
    This what I have found out for now, if later testing shows anything else I'll post the results.
    Regards,
    Tony Garabedian
    I just added a stack canvas on that same window and the problem returned....
    So I rearranged the canvases, and purposely set the canvas on the console window, it worked, so now it seems that the problem appears if you have a stacked canvas AND a tab canvas on the same window.
    Hope this ain't a bug it sure looks and acts like one though.
    Message was edited by:
    Tony Garabedian

  • Tab Canvas displaying Stacked Canvas at runtime disappears?

    Hi,
    I have 3 canvases that contain the following:
    1) Content Canvas -- This contains the TREE item.
    2) Tab Canvas -- A tab canvas with a single Tab Page
    3) Stacked Canvas -- This is a Stack Canvas with a few
    text items on it.
    4) Single Window.
    ======At runtime the following actions occur: ==========
    1) The Viewport of the stacked canvas is set to the
    Viewport of the Tab Page on the Tab Canvas so that it
    looks like the Tab Page has a vertical and horizontal
    scrollbar with text items displayed.
    2) A text item on the Stacked Canvas is in focus as soon
    the as the form window is displayed.
    ===================Problem is : =====================
    1) When I select a Node of the Tree Item, the Tab Canvas
    automatically disappears(or becomes invisible) , as a
    result the stacked canvas displayed within it at
    runtime also becomes invisible. I am left with only
    the Tree item being displayed.
    =======================================================
    PS : I have never experienced this problem with just the
    content canvas and the Tab Canvas together.
    Any soultion to this problem is most appreciated.
    Thanks
    Sharath

    I am experiencing the exact same thing. The width of the tabs in the layout editor is varied depending on the length of the text. However, at run-time, the width of the tabs is fixed, causing the tabs to be wider than the window and a set of VCR buttons to appear in the upper right corner of the canvas. Personally, I think this is a Forms bug. Why would they intentionally let us set the width to variable at design-time only to force a fixed width at run-time?

  • Forms 6i, Stacked & Tabbed Canvas- Wierd behaviour

    Hi,
    I am having a wierd problem:
    Scenario:
    I have a datablock of 40 columns.
    I put 1 (say col-1 on page_1 and col-21 on page_2) column each on two different TAB pages.
    I created 2 stacked canvases: page_1_stacked & page_2_stacked
    I put col-2 to col-10 on page_1_stacked
    and col-22 to col-40 on page_2_stacked
    I used the following code to show/hide the appropriate cols/stack canvases when the users changes Tab pages:
    [when-tab-page-changed
    if (:system.tab_new_page ='PAGE_1')
         then
         show_view('PAGE_1_STACKED');
         hide_view(''PAGE_2_STACKED'');
    elsif (:system.tab_new_page ='PAGE_2')
         then
         hide_view('PAGE_1_STACKED');
         show_view(''PAGE_2_STACKED'');
    end if;
    Problem:
    Everything seems to work fine, the stacked canvases show/hide as expected, but --->as soon as I put my cursor in any column on TABBED PAGE (here col-1 or col-21), all the stacked canvases vanish
    -->if as a result of above case where I put the cursor in a tabbed-page col and canvas vanished, I navigate to the next field (which is on canvas), the canvas shows up (which is normal)....but then this canvas wont get hidden with my hide view... and end up with all stacked canvases shown together or none at all
    I have played around with all the properties and am really trapped.
    Please help!
    Thanks.

    Devang, are you aware that if you put the cursor focus in a field, Forms will ignore any show_view or hide_view commands if they cause the cursor to disappear? And if your cursor focus is in a field in a stacked view, hide_view will not work. Forms will not let you hide or cover up what ever item is identified by :System.Cursor_Item.
    I do not know why you need Col_1 or col_21 on the tab canvas. Put them on your stacked canvasses, too.
    Use a when-new-item-instance block-level trigger to determine which tab page should be displayed. If :System.trigger_item = col_1 through col_20, make sure Page_1 is displayed, and for col_21 through col_40, make sure Page_2 is displayed.
    Similarly, use a when-tab-page-changed trigger to move the cursor to the correct canvas. You wouldn't even need to use show_view or hide_view, Forms will do that for you each time you move into an item on either canvas.
    And why are you using two canvases anyway? Since you are using a horizontal scrollbar, why not put them all on a single canvas? (And then you wouldn't need the tab pages.)

  • FRM-13002 : Stacked and Tab Canvas must be created within Content Canvas

    Hi,
    I have a Tab Canvas with 2 pages on it.
    In one of the pages the data to be displayed will be
    out of the region(size or length) of that page.
    I read in this forum for the same problem, the
    member had suggested to use a Stacked Canvas on that
    Tab page alone and enable the scrollbars of the stacked canvas.
    When I drag and drop a stacked canvas on a tab page
    of the tab canvas I get the following error:
    FRM-13002 : Stacked and Tab Canvas must be created
    within content canvas.
    Any help is appreciated.
    Thanks in advance
    Sharath

    Hi,
    I am breaking my head over this.
    I am still unable to solve this issue.
    ========The Requirement is as follows :===========
    When I select a Tab Page of a Tab canvas, I get a
    combo box with items in it. When I select an item from
    the combo box, based on the item selected, I am
    retrieveing the data from the database and displaying
    it in that Tab Page itself. This data is in a matrix
    format. i,e Has a number of rows and columns.
    Without a Horizontal and a Vertical Toolbar attached
    to the Tab Page I would be unable to view all the records
    that are displayed on that Tab Page.
    Any suggestions or examples is most welcome and
    appreciated.
    NOTE : ALso in what situations can we use a stacked
    canvas, if the designer does not allow me to
    use it with other canvases?.
    Thanks in advance
    Sharath.

  • Creating items on Tab canvas

    I am creating text items on a Tab canvas.It allows me to put the items upto certain area only.If I put any item beyond while generating .fmx ,gives me error
    FRM-30041 Position of item places it off of canvas.
    However my canvas size is enough to accomadate.I am encountering this problem only with Tab canvas.With content canvas it is perfectly alright.
    what is the problem and solution?
    Appreciate help.Thanx.
    null

    Thanks randall.It worked.

  • How can i change the direction of tab canvas in 10g ?

    hi all
    how can i change the direction of tab canvas in 10g at runtime i want to change the direction from left_to_right to right_to_left when i did that the form not appears well
    all prompts of item not dispalyed in order of its sequence ,in spite of that it works in 6i well and change direction without any problems
    i have been used set_canvas_property and set_view_property but it doesn't work
    can anybody help me in this mater?

    please can any body help?

  • How to change the number of  tab in a Tab Canvas?

    hello :)
    any answers please ?

    user9068133 - Posted: Nov 3, 2010 2:42 PM yes , it works very well on forms 10g, i know that is not a big problem but what can i do ! i have searched on google how to do that but i didn't find nothing .>
    What exactly did you search for on Google? What is "that"?
    Are you trying to add more tab pages to a Tabbed Canvas from the Forms Builder? If so, user13390506 is sort of right. Click on the "Canvases" node of the Object Navigator press the *<font color="green">green + </font>* button to add a new "Content" canvas to your form. Now you need to open the property pallet of the new canvas and change the "Canvas Type" property to "Tab." You will notice that the icon of the new canvas you created in the Object Navigator has changed. Click on the + node next to your new "Tab" canvas to reveal the "Tab Pages" node. Again, open this node (by clicking on the +) to reveal the individual tab pages. By default, Forms will create two tab pages. You can add a tab page in the "Tab Pages" node by clicking on the node and then clicking on the + button. To remove a tab page from the "Tab Pages" node, click on the tab page you want to remove and then click on the *<font color="red">red -</font>* (minus) button.
    If you are trying to add a new tab page during the Form runtime - as I mentioned before - this is not possible.
    Also, what is your Forms version?
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Tab canvas does not put the items in their specified positions

    Hi all,
    I have created a form with a tab canvas with three tab pages, each page has it's own text items.
    I saved this form without any problems.
    When i open this form again, i found that, some of the items in the first tab page are not put in their positions in this page, although the x position and y position is still correct in the property pallette.
    i overcome this by moving these items with the mouse to any direction and returning it back, but the problem comes after saving and trying to open the form again.
    Not : this occures only in the first tab page, i tried to swap the second tab page(page7) with the first tab page (page6), now the problem occures with page7(which became the first after swap) .
    Please help

    Yes, the items are in a frame.
    Both automatically and locked for the frame upate layout property causes the problem.
    I want to tell that the form in run time is ok, but in the forms builder the text items are not in their specified positions.
    Then when changing any property for the items even if it was not related to the item position, the item is then displayed in the correct position.

  • Need to disable tabbed canvas through personalization in standard form.

    Dear Friends,
    I need to disable one of the tabbed canvas (button), based on condition from another tabbed canvas..in oracle applications 11i
    This is urgent requirment from 3 days im trying but im unable to do this...
    could you please solve me from this problem...
    Example (Original Requirement):_
    In order Management, in shipping transactions, we are having lines and delivery tabs..etc
    in that, if delivery name is not null in lines tab, then we need to disable delivary tab.....this is the actual requirement.....
    Many thanks in advance,
    Regards,
    subash

    Write a personalization that disables all fields on the delivery tab.
    It should be similar to what you are looking for.
    Sandeep Gandhi

  • Setting stacked canvas properties when inside a tab canvas

    Hi all,
    I grope setting the x and y position of a stacked canvas programmatically : I work inside a tab canvas , there is one multirecord based block which is split into two tab pages. The problem is that the x and y positions of each first item in each tab of the block are no the same. And I want to hide and show the stacked canvas on which is based the scrollbar of the block , according to the top_most_tab_page.
    The stacked canvas has the same width and height as the tab canvas ; it has viewport width set to the width of the scrollbar , say 0.415 ; it has viewport height set to the length of the scrollbar , say 1.833 ; the viewport X/Y position on canvas properties are set to 0.
    I tried to set the VIEWPORT_X_POS and VIEWPORT_Y_POS properties of the view programmatically to place the scrollbar just sticky with the first item when in each tab page , but the scrollbar is not displayed on the desired place. It is moved.
    So how to place the stacked canvas at the right position to be stuck with the left first item ?
    Thank you very much indeed.

    I did a little test and it works (it'll only take you 3 min)
    Create a new Form.
    Add 3 Canvases 1 Content and 2 Tab with the following Properties
    Content
    Vieport X Position on Canvas: 0
    Vieport Y Position on Canvas: 0
    Width: 540
    Height: 324
    Master Tabs
    Vieport X: 35
    Vieport Y: 20
    Vieport Width: 460
    Vieport Heigth: 280
    Detail Tabs
    Vieport X: 150
    Vieport Y: 95
    Vieport Width: 260
    Vieport Heigth: 160
    Then go to Layout editor and while viewing the Content Canvas go to the menu View -> Stacked View...
    From there select both tab canvases to be shown.
    Also add a dummy item (i.e a button )somewhere in the form otherwise nothing will appear when you run the form.

Maybe you are looking for

  • Delivery error as credit check

    Hi  Gurus, We are on the ECC 6.0. While going through the SD cycle I am facing certain issues. I'm creating a delivery from the sales order but getting the following error: While saving order getting message as financial document not assigned. And cr

  • I  want to edit some words in it

    I have a fully PDF files. It contains text but, I  want to edit some words in it. So I want to   Convert it in doc. Format and changes these words. Is there are any sites where I can convert it?

  • CS6 document save as CS3 document

    I want to export a CS6 document for editing in CS3. How does it work?

  • Removing Personal data files

    I just bought the new iMac and am selling my 17 "iMac G5 Power PC. I migrated info with no problem but now I have a potential buyer and I need to get my info off the G5. I recall information exists as to how to completely wipe my personal info from t

  • Error while loading transaction data

    Dear Guru's I am loading transaction data which got terminated giving processing overdue error . While analysing i found there are lot of records in psa marked in red . Please suggest how to resolve and to load valid records. Regards Karan