:system.form_status

I am coming into my form and performing enter query and execute query without criteria. I exit the window and receive a message about saving, I did not change anything. I have a status of "N" on the form and the save message only appear when the status equals "N". The save message is triggered because the form_status is "changed". What FORM triggers would change the form_status?
Thanks.
Jaffee

Do you have a Post-Query trigger on any of your Data Blocks? This is typically where you would see the status of a block change when a query is performed.
Craig B-)
If someone's response is helpful or correct, please mark it accordingly.

Similar Messages

  • How i check the :SYSTEM.FORM_STATUS is DELETE OR REMOVE

    hi master
    SIR how i check my :SYSTEM.FORM_STATUS is DELETE OR REMOVE
    please gide me idea
    thanking you
    aamir

    hello,
    As the online documentation says, :SYSTEM.FORM_STATUS can take 3 different values:
    CHANGED
    NEW
    QUERY
    There is no status for a record that has just been removed. Only the PRE-DELETE, ON-DELETE and POST_DELETE triggers fire on this record.
    Francois

  • :system.form_status question

    Hi there,
    I want the form_status to be query when user enters the form. How do i do that?
    Right now in when-new-form-instance trigger i have do_key('ENTER-QUERY')
    when i check the system mode it is ENTER-QUERY but form status is NEW.
    How can i make it QUERY??
    THanks

    See this page for a suggestion: http://talk2gerd.blogspot.com/2007/08/set-record-status-to-query-after-post.html

  • Why :system.block_status is always "Query"?

    Hi,
    When I check the status of block(using :system.block_status),the status is always "QUERY".Why the status never changes to "CHANGED" OR "NEW"??
    Can help me??
    Thanks.

    If your block is a non-db block, then :SYSTEM.FORM_STATUS will return NEW when you run the form and do not change anything. If you type-in any value in any item, its status will change to QUERY.
    But if it is a db block, then :SYSTEM.FORM_STATUS will return NEW on form opening, CHANGED when anything is changed on the form and QUERY if you queried it.
    You may try with a simple form with just couple of text items and a button on it. Under WHEN-BUTTON-PRESSED trigger, message out the :SYSTEM.FORM_STATUS and see what it returns to you. Then change the block to a DB Block and try the same thing. You'll notice the difference.
    You may also look into :SYSTEM.BLOCK_STATUS and :SYSTEM.RECORD_STATUS.
    Hope it helps!

  • How can i check for posted but not yet commited changes in a form

    Dears
    I make changes programmatically in a form then i post it using (Post built in).
    If the user exits the form, i make check for any changes in the form to commit it using the system variable :system.form_status
    Unfortunately the value of this system variable is 'Query' not 'Changed' because of using the post built in.
    Is ther another system variable ( or any another way ) that check for posted but not yet commited changes in the form ?
    Thanks a lot
    Mostafa Abolaynain

    I had faced similar situation. Using of package variable which identifies, what is the user's latest action.
    This is just a workaround.
    Capture what the user has performed into a variable say, PKG_VAR.ACTION,
    This will be assigned values like List L, and Create C, Update U and Saved S.
    If commit is executed,assing the status S to the variable.
    So while closing,
    IF :system.form_status = 'CHANGED' or PKG_VAR.ACTION in ('C','U') THEN     
    -- validate the data, n perform commit.
    else
    -- just close the form.
    end if;
    Regards
    Deepz : )

  • How to know if commit_form is successful

    Hi
    I am new with Oracle Forms.
    I am developing an application using Oracle 10g express and forms 6i.
    Can somebody please guide me regarding code under SAVE button(I have placed some push buttons on form for add_new, Save, Reset ect).
    I am trying to handle DUPLICATE_RECORDS AND NULL_VALUES through this code which is in ON_ERROR form trigger
    declare
    x number;    
    begin
    if dbms_error_code in (-1400, -1407) then
         x:=show_alert('alert_Empty');
       raise form_trigger_failure;
    elsIF dbms_error_code='-00001' then
         x:=show_alert('alert_duplicate');
       raise form_trigger_failure;
    end if;
    end;
    and code under SAVE button is
    declare
    a number;
    begin
               commit_form;
                a:=show_alert('alert_Saved');
                clear_form(NO_VALIDATE);
                raise form_trigger_failure;   
    but even form is prompting for duplicate value or null value, Alert_save is showing as record has been saved.
    My question is how I can be sure that record has been saved actually?????
    I have tried to check :SYSTEM.FORM_STATUS and it return CHANGED .
    is there any approach I should use, any sample piece of code will be much appreciated.
    regards.
    end;

    Well, looking at the Forms Help System, (FORM_SUCCESS built-in) they give an example of how to test if the commit was successful.
    IF Form_Success THEN
      Commit;
      IF :System.Form_Status <> 'QUERY' THEN
        Message('Error prevented Commit');
        RAISE Form_Trigger_Failure;
      END IF;
    END IF;
    Craig...

  • When-validate-item trigger restriction on open form or call form

    W have when-validate-item trigger. I need to place a code here that will bring up a form when the "valid entry" on the item has been made. I am getting a frm-40737:Illegal restricted procedure COMMIT...
    Code snippet on the procedure that I am calling from the when-validate-item:
    IF :System.Form_Status = 'CHANGED' THEN
    Commit_Form;
    end if;
    Call_Form ('MY_FORM', HIDE, NO_REPLACE, NO_QUERY_ONLY,'PARAM');
    Is there a work-around. We also cannot use timers here.
    Any help is appreciated?
    TIA

    Thanks Sudha, I tested and it worked with the key-next-item trigger.
    The only thing though, I was told that the users will not use the enter key when they navigate out of the field, it is either clicking on an exit button or function key F4...so I am still stuck with the same problem.
    This site is really helpful and I hope to receive more ideas.
    Thanks!

  • How to Call  fnd_submit.submit_program  in a custom Form ?

    Hi,
    Im creating a custom form based on TEMPLATE.fmb in Oracle EBS R12.
    I want to call a concurrent program (called: RVCTP) through trigger WHEN_WINDOW_CLOSED or WHEN_BOTTON_PRESSED whatever..
    I'm using this function: fnd_submit.submit_program
    How i can call it through the trigger ?
    I tried :
    declare
    con bolean;
    begin
    con:=fnd_submit.set_request_set('PO','TEST');
    con:= fnd_submit.submit_program('PO','RVCTP',NULL,'BATCH',NULL,89);
    commit;
    end;
    Nothing happening!
    Please advise!
    PS. i used fnd_submit.set_request_set because in Oracle Apps Developer's Guide it says i have to use it before fnd_submit.submit_program.

    Thank you,
    Check This in (20-30 Oracle Applications Developer's Guide R12 ) :
    Example Request Submissions
    /* Example 1 */
    /* Submit a request from a form and commit*/
    :parameter.req_id :=
    FND_REQUEST.SUBMIT_REQUEST (
    :blockname.appsname,
    :blockname.program,
    :blockname.description,
    :blockname.start_time,
    :blockname.sub_req = 'Y',
    123, NAME_IN('ORDERS.ORDER_ID'), 'abc',
    chr(0), '', '', '', '', '', '',
    IF :parameter.req_id = 0 THEN
    FND_MESSAGE.RETRIEVE;
    FND_MESSAGE.ERROR;
    ELSE
    IF :SYSTEM.FORM_STATUS != 'CHANGED' THEN
    IF app_form.quietcommit THEN
    /*form commits without asking user to save changes*/
    fnd_message.set_name('SQLGL',
    'GL_REQUEST_SUBMITTED');
    fnd_message.set_TOKEN('REQUEST_ID',
    TO_CHAR(:PARAMETER.REQ_ID), FALSE);
    fnd_message.show;
    ELSE
    fnd_message.set_name('FND',
    'CONC-REQUEST SUBMISSION FAILED');
    fnd_message.error;
    END IF;
    ELSE
    DO_KEY('COMMIT_FORM');
    IF :SYSTEM.FORM_STATUS != 'CHANGED' THEN
    /*commit was successful*/
    fnd_message.set_name('SQLGL',
    'GL_REQUEST_SUBMITTED');
    fnd_message.set_TOKEN('REQUEST_ID',
    TO_CHAR(:PARAMETER.REQ_ID), FALSE);
    fnd_message.show;
    END IF;
    END IF;
    END IF;
    I'm still getting an error "Wrong Number of types or arguments in call to 'SUBMIT_REQUEST' "

  • Error in populating table data through forms

    I had one SIM REPLACEMENT Form which has a base block table PPBS_SIM_CHANGE.
    Once all the entires are entered the table gets populated.
    But some times it seen that the base table does not get populated.Also the form does not gives any error.Pl help me to find out the error.
    In the Save button the following code is written
    IF :SYSTEM.FORM_STATUS IN ('NEW','CHANGED') THEN
    commit;
    if not form_success then
    message ('Transaction Failed...');
    else
    message('Transaction Successfully Completed..');
    end if;
    END IF;

    Why do you create a Save button in the first place? Forms already has its own Save botton.

  • Problem: trying to update all detail rows on pre-commit (MASTER DETAIL FORM

    Hi:
    I got a MASTER DETAIL form... and I need to update every detail row of this form (if the master was updated) before commiting the changes. the problem is that i cannot do that for instance in PRE-COMMIT or ON-COMMIT... it's an "illegal operation". I achieved part of it by coding KEY-COMMIT... but that did not solve the all problem. first take a look of the kind of code i want execute before commiting.
    form trigger key-commit code is is somehow like this:
    DECLARE
    tot_line NUMBER (3);
    line NUMBER (3);
    begin
    IF NAME_IN ('system.form_status') = 'CHANGED'
    THEN
    GO_BLOCK ('DETAIL');
    LAST_RECORD;
    tot_line := GET_BLOCK_PROPERTY ('DETAIL', current_record);
    FIRST_RECORD;
    line:= 1;
    LOOP
    :detail.quant := :detail.quant + 1;
    EXIT WHEN line= tot_line;
    next_record;
    line:= line+ 1;
    END LOOP;
    FIRST_RECORD;
    GO_BLOCK ('MASTER');
    END IF;
    COMMIT;
    end;
    The problem is for instance when the users close form in the "X" button (right top, near minimize form) ... If they do that Forms ask "Do you want to save changes?" ... and with this i do not execute the update of the detail rows...
    But there are other situations when this happens... for instance if EXECUTE_QUERY when i change a record...
    Anyone help?
    Joao Oliveira

    Use PRE-UPDATE trigger (Master block).
    begin
    update <detail_table>
    set quant + 1
    where <detail_table>.<relaition_column1> = :<Master_block>.<relaition_item1>
    and <detail_table>.<relaition_columnN> = :<Master_block>.<relaition_itemN>
    and <detail_block_WHERE>;
    EXCEPTION WHEN OTHERS THEN NULL;
    end;

  • Checking for outstanding commits in session ...

    (forms 9iR2, 9i DBMS)
    does anyone have any advice on if it is possible (and if so - how!) I can achive the following:
    I would like to find out if there is a requirement for carrying out a commit in my form, ie when an item on a block has changed, or one or more blocks of PL/SQL have issued any DML statements (INSERT/DELETE/MERGE) and have not issued a commit.
    The "block has changed" part is easy, using :system.form_status = 'CHANGED', but the dml statement is proving to be trickier - I thought that I could use sql%rowcount, but this does not appear to persist accross the forms scope, but just within the pl/sql block which the DML is originally issued in.
    example:
    procedure write_a_record is
    begin
    insert into test_table (test_col) values ('X');
    message(sql%rowcount); --this would display 1, as expected
    end;
    procedure commit_if_needed is
    begin
    if (:system.form_status = 'CHANGED') or (sql%rowcount > 0) then
    commit;
    end if;
    end;
    however, when the second procedure is called, after the first one - sql%rowcount returns NULL!
    any ideas?!
    thanks,
    pete :)

    Peter,
    SQL*ROWCOUNT is not what you want in any case.
    You can:
    delete from some_tab;
    delete from some_tab where 1=2;
    and what you will do with sql%rowcount?
    As far as I remember there is something in the database that indicate whether were any changes since start of transaction, but it seems that this is more dba topic than Forms...
    But why you need procedure commit_if_needed ?
    Why not commit_always?
    If nothing to commit it will nothing to do.

  • Transactional triggers and commit processing

    I have only been an active member of this thread for a couple of weeks and have tried to contribute to a few postings. But I have also noticed lots of postings relating to the use of DML statements inside what I would call non commit time triggers.
    What I mean here is, for example, a WHEN-BUTTON-PRESSED trigger that does inserts, updates, deletes, followed by the COMMIT_FORM procedure.
    I thought it might be useful to draw attention to the possible pitfalls of this approach. I'm not saying that this approach is wrong - far from it, but sometimes it means that people aren't leveraging the functionality that you get "for free" from Forms.
    By coding some DML followed by a Commit_Form, you are not getting any rollback functionality from Forms. For example:
    INSERT INTO A
    INSERT INTO B
    COMMIT_FORM;
    Let's imagine that the insert into A worked but the insert into B failed for some reason. The user gets an unhandled exception. Now imagine that the cause of the error is cleared up, and the user presses the button (or whatever the invokation action was) again, and the commit works. You will have 2 records in A and 1 in B. You may not have expected that, and without coding your own rollback/savepoint that's what you would get.
    You also (1) don't get a Working... message without coding it yourself, and (2) get the "No changes to commit" message; removing this is the subject of many threads on this site.
    If you have a block which is based over a table which you need to update, then all of the DML statements ought to be coded inside PRE/POST/ON INSERT/UDPATE/DELETE statements, or other Forms transactional triggers (pre-database-commit etc..). If you need to change other tables then put the DML for them inside those triggers. Then you don’t have to worry about which records the user changed – if the user didn’t touch them then Forms won’t fire the triggers. And when you call the COMMIT_FORM procedure, Forms will fire the triggers for you and if any of them fail, it will rollback back to where the COMMIT_FORM started.
    An example in 1 thread I saw this morning, was a Delete button, which was to delete the current record in a multi-record block. This button performed the “DELETE FROM <table> WHERE <key=:block.key>” followed by a Commit. Then of course the block needed to be re-queried to reflect the fact that the record had gone. Using the power of Forms to simply call the DELETE_RECORD procedure would have achieved the same result without needing to requery the block. And Forms would do the delete by ROWID, the fastest way of doing it.
    If you don’t have a block based over a table, then you can consider creating a dummy block which uses Transactional Triggers. Code an ON-INSERT on that block which includes the DML you want to execute. Then in the trigger initiating the commit processing you would do something like:
    :DUMMY_BLOCK.ITEM1 := ‘X’;
    COMMIT_FORM;
    IF (NOT FORM_SUCCESS) OR :SYSTEM.FORM_STATUS != ‘QUERY’ THEN
    -- the commit failed
    END IF;
    Then you’ll get a nice Working.. message and full rollback control.
    I think the moral of what I’m trying to get across is to use the power of Forms in the way it handles the transactions. Whilst we moan about it, it is actually quite good at that!
    I hope this posting is taken in a positive light, I am certainly not trying to teach anyone to “suck eggs”.
    PS. I find it ironic that you were prevented from coding DML statements outside of commit time triggers, in Forms 2.3!

    Thank you, Kevin. Very informative.

  • How do I know which block has been changed in Master/Detail

    Hi,
    I have master detail blocks. How do I know which block has been changed?
    I used :SYSTEM.FORM_STATUS. It only gave me "Changed" or "Query". but didn't tell me which block has been changed in MASTER or DETAIL.

    I believe if :system.form_status != 'QUERY' you'll need to loop through through the blocks checking :system.block_status to see who changed. Of course you'd have to go_block() before checking the status.

  • Forms save message problem!

    Um working in forms 9i.
    I have set SeprateFrame = True in the configuration file, so that the forms applet opens up in a new window.
    Now there are two BROWSER windows...one, in which user types the URL of the Forms server and Second, in which the forms applet opens.
    I can close the form without getting the default Forms "Do u want to save the ....?" message (by clicking the cross button on the APPLET inside the BROWSER)if there are any pending changes in the data block with a form level When_Window_Closed trigger using Exit_Form(No_Validate). But the problem starts when there are pending changes in the form and I directly press the cross button on the BROWSER which encloses the APPLET. I get the same annoying Forms message "Do u want to save?".
    Could somobody tell me how to control the BROWSER window enclosing the APPLET, because all the forms triggers are related with forms only and one have no control over the BROWSER.
    Please help.

    hi
    try this.
    BEGIN
                   /* ** Force validation to happen first */
                   Enter;
                   IF NOT Form_Success THEN
                        RAISE Form_Trigger_Failure;
                   END IF;
                   /* ** Commit if anything is changed */
                   IF :System.Form_Status = 'CHANGED'
                        THEN
                        Commit_Form;
                        /* ** A successful commit operation sets Form_Status back ** to 'QUERY'. */
                        IF :System.Form_Status <> 'QUERY' THEN
                             Message('An error prevented your changes from being committed.');
                             Bell;
                             RAISE Form_Trigger_Failure;
                        END IF;
                   END IF;     
    :system.message_level := '10';
    COMMIT_FORM;
    :system.message_level := '0';
    if
    :system.form_status != 'CHANGED'
    then
    -- go_block('block');
    else
    Message ( 'Your entered data could not be saved. Please check the form.' );
    Message ( ' ' );
    end if;
    end; -----
    On-Message trigger (Form Level)
    begin
    if
    abs ( message_code ) = 40400
    then
    clear_message;
    bell;
    message ( message_text, no_acknowledge );
    else
    message ( message_text );
    end if;
    end;
    Sarah

  • COMMIT_FOARM IS NOT WORKING INSIDE THE  WHEN-MOUSE-CLICK

    Dear friends
    I have following script in when-mouse-click trigger
    BEGIN
    IF NOT Form_Success THEN
    Bell;
    RAISE Form_Trigger_Failure;
    END IF;
    IF :System.Form_Status = 'CHANGED' THEN
    IF :LOCK_FLAG = 1 THEN
    UPDATE PROJ.IM_REQUEST_HEADER
         SET LOCK_FLAG = 1
         WHERE DOC_CODE = :DOC_CODE ;
         SHOW_MESSAGE('DOCUMENT CODE -1'|| ' '||:DOC_CODE);
         SHOW_MESSAGE('LOCK FLAG -1'|| ' '||:LOCK_FLAG);
         Commit_Form;
         MESSAGE('The Record have been changed -1 ');
    ELSE
         UPDATE PROJ.IM_REQUEST_HEADER
         SET LOCK_FLAG = 0
         WHERE DOC_CODE = :DOC_CODE ;
         Commit_Form;
         MESSAGE('The Record have been changed - 2');
    END IF;
    ELSIF :System.Form_Status <> 'QUERY' THEN
    Message('An error prevented your changes from being
    committed.');
    Bell;
    RAISE Form_Trigger_Failure;
    END IF;
    END;
    Note :
    The above trigger is attached to this field LOCK_FLAG and the item type of LOCK_FLAG is check box in the form and the property of the LOCK_FLAG
    is site as the following :
    database item = NO , and the property of the blcok IM_REQUEST_HEADER is site as the following :
    database data block = NO
    and my problem is when i change the value of LOCK_FLAG is not executting the update statement .
    waiting for your valuable answer in details thank in advance for your cooperation.
    best regards
    jamil alshaibani

    Dear Wilfred
    Thank you very much for your cooperation, yes when I change the “Database data block “ property to no, it works, as I wanted to be.
    Notes about my application:
    In my program I provide the store keeper query screen, he can check the orders and lock the specific order by clicking on the LOCK_FLAG field, so after he locked the field the requester user can not change his order content if it is locked by the store keeper
    And the way I was trying to do it ,by query the data from      IM_REQUEST_HEADER Table which is the Order table which is the header table ,the form is displaying doc_code ,doc_date ,lock_flag,and the order store name ,and I provide him a report on the same form that he can see the details of the order items ,and all the field properties set to no, that is update allowed to no ,insert allowed set to no, but the field lock_flag property set as update allowed to yes and insert allowed set to yes
    and I would like to now how it was displaying this message
    ORA-01400 cannot insert NULL INTO “PROJ”.IM_REQUEST_HEADER”.DOC_CODE
    And I was not inserting, I was just updating the lock_flag by the above update statement.
    Best regards
    Jamil Alshaibani

Maybe you are looking for

  • Photos too grainy!!

    I have a lot of grainy pictures that I need to fix. What's the best way to make them sharper? I tried using the "Sharpen" feature but it made it look way worse. Thanks!

  • New itunes wiped ipod of all music

    Okay, so... I got a new computer, which has the new iTunes. So I just wanted to add some music to my ipod, EXCEPT when I plugged it in, ALL SEEMED fine with it, I had my music on there (I even made sure my preferences said, Prevent iPods and other de

  • How to implement classes and methods in badi's ?

    how to implement classes and methods in badi's? and where i have to write the code based on the requirement?can anyone explain me briefly?

  • Where have the tools menu gone

    I have the latet version of firefox and want to get rid of yahoo as my home page and go back my original home.

  • How to download Firefox 4.3 for Mac?

    How can I find and download Firefox 4.3 for my MacBook? I need it to visit a special page.