:system.block_status

hi all,
can anybody tell me based on what condition form decides that :system.block_status is changed. is its based on constraints on the table what we are using..
Thanks..

Hello,
The status is changed when a record inside it has its own status changed, and the record has its status changed when an item inside has its status changed.
Francois

Similar Messages

  • 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!

  • Commit_form creating issue with When-New-Record-Instance trigger

    Hello friends,
    I am using Oracle forms 6i . I have a multi-data block. I have written commit_form in when-new-record-instance of the data block. When I launch the form on my instance the form does not open.
    But when I comment out this code, the form opens on the instance. What could be the exact problem?
    Also is there any condition that I can specify if the whole data block is null when I open the form?

    Hi...
    In When-New-Record-Instance, check if the block status is NEW. If Not, then just apply COMMIT_FORM;
    try this code in your trigger
    IF :SYSTEM.BLOCK_STATUS = 'CHANGED'
    THEN
    COMMIT_FORM;
    END IF;
    Should work for you.
    Thanks....

  • When new record instance trigger at Fire Enter Query event is throwing erro

    HI
    I have the following code on when new record instance which is set to fire at Enter Query Mode
    IF :SYSTEM.BLOCK_STATUS <> 'QUERY' THEN
    rec_num:=Get_Block_Property( 'MASTER', CURRENT_RECORD);
    GO_ITEM('DETAIL.ITEM_NAME');
    CLEAR_BLOCK(NO_VALIDATE);
    GO_BLOCK('MASTER');
    GO_RECORD(rec_num);
    END IF;
    But this is throwing error when I am querying record on master block.
    It says 'Function not allowed.Please see a list of keys or functions'
    Thanks in advance.

    hi,
    GO_ITEM( ) procedure is resctricted procedure.It can not be used in Enter Query mode to navigate to an item in a different block.
    You can check wheter rest of the procedures are Enter Query Mode -Yes/No thourgh forms help window.
    Message was edited by:
    Manish.Sharma

  • KEY-COMMIT not firing

    I am working on an Oracle 10g database and am using Oracle Forms Developer 10g to create forms. I have created a new 2 field table in my database:
    CREATE TABLE career_cluster
    (career_cluster_code VARCHAR2(3) NOT NULL
    ,CONSTRAINT career_cluster_pk
    PRIMARY KEY (career_cluster_code)
    USING INDEX
    TABLESPACE GALINDX
    ,career_cluster_desc VARCHAR2(30) NOT NULL
    TABLESPACE galaxy;
    I have also created a form so that users can enter data into this table. I have a career_cluster data block in my form with two items: career_cluster_code (set with a maximum length of 3 in my property palette) and career_cluster_desc (set with a maximum length of 30 in my property palette). Both items are also set in the property palettes to a char data type. In my SQL code (in the form) I always have these two items set as varchar2 with (3) and (30), respectively.
    The form opens fine when I run it, however when I click on my SAVE button my KEY-COMMIT trigger is not fired -- it jumps directly to my ON-ERROR trigger and I get an Oracle ORA-06502 error message. I don't see any inconsistencies in my data types or lengths. Below is my KEY-COMMIT code:
    DECLARE hold_item varchar2(30) := :system.cursor_item;
    hold_record varchar2(10) := :system.cursor_record;
    mess_name varchar2(80);
    mess_text varchar2(80);
    BEGIN
    go_block('career_cluster');
         if (error_code = 40202) then
              goto end_of_trigger;
         end if;
    if :system.block_status = 'CHANGED' then null;
    commit_form;
    if FORM_SUCCESS then null;
    mess_name := 'Transaction Complete';
    mess_text := 'Career Cluster(s) committed to the database';
    DISP_ALERT2(mess_text,mess_name);
    end if;
    else null;
    mess_name := 'No changes to commit';
    mess_text := 'No changes have been made to the Career Cluster Code Table';
    DISP_ALERT2(mess_text,mess_name);
    end if;
    go_item(hold_item);
    go_record(hold_record);
    <<end_of_trigger>>
    null;
    END;
    I put in a DISP_ALERT message right after the BEGIN statement but it never displayed so I don't think this trigger is firing. I also put a similar DISP_ALERT message in my ON-ERROR trigger and that does display, so I know it is going right to my ON-ERROR trigger. Does anyone have any ideas what might be triggering the ON-ERROR?
    Thanks,
    -NTW

    ORA-06502 is a numeric or value error string which is raised when an arithmetic, numeric, string, conversion, or constraint error occurrs. For example, this error occurs if an attempt is made to assign the value NULL to a variable declared NOT NULL, or if an attempt is made to assign an integer larger than 99 to a variable declared NUMBER(2).
    I would suggest you to look at the columns definitions in the table and the form fields/variables data types and lengths and make sure they are same as the backend table columns.
    Also, you don't need to put NULL; after each IF ELSE conditions if you have any other statements.
    I would also suggest that you handle any errors in either exception handler of the block or in the ON-ERROR triggers.
    Try this:
    DECLARE
        hold_item varchar2(30) := :system.cursor_item;
        hold_record varchar2(10) := :system.cursor_record;
        mess_name varchar2(80);
        mess_text varchar2(80);
    BEGIN
        GO_BLOCK('career_cluster');
        IF :system.block_status = 'CHANGED' THEN
            commit_form;
            IF FORM_SUCCESS THEN
                mess_name := 'Transaction Complete';
                mess_text := 'Career Cluster(s) committed to the database';
                DISP_ALERT2(mess_text,mess_name);
            END IF;
        ELSE
            mess_name := 'No changes to commit';
            mess_text := 'No changes have been made to the Career Cluster Code Table';
            DISP_ALERT2(mess_text,mess_name);
        END IF;
        GO_RECORD(hold_record);
        GO_ITEM(hold_item);
    EXCEPTION
      WHEN OTHERS THEN  MESSAGE(TO_CHAR(ERROR_CODE)||'-'||ERROR_TEXT);
      RAISE FORM_TRIGGER_FAILURE;
    END;

  • Unable to insert record in child block

    Dear all,
    I am facing a very strange problem.
    Actually i have a master-detail form where i need to insert master record as well as child records for the corresponding master item.
    For this i have a LOV in master block which populate the master item and execute the coresponding child records.
    so first time when i load the form i select a item from master block through a LOV this time :SYSTEM.BLOCK_STATUS is NEW and i populate a item from LOV then :SYSTEM.BLOCK_STATUS is NEW changed to query and i have inserted a next record in child block pressed F10 and it saved very well.
    But the problem is when i again select another item from master block through LOV and again tried to insert a record in child record this time it won't saved and the very stragly the cusor moved to master item showing the FRM-40600'Record has already been inserted'
    Please help why is it happening ?
    Need yours help.

    But the problem is when i again select another item from master block through LOV and again tried to insert a record in child record this time it won't saved and the very stragly the cusor moved to master item showing the FRM-40600'Record has already been inserted'When you select a new record in the Master block through the LOV, make sure you clear your form before you query the selected record. Forms thinks you are modifying the same master record and not a new record.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • 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.

  • Oracle Forms 6i - mySQL (Commit Problem)

    Hi,
    i'm using Oracle Forms Builder 6i to connect to mySQL 3.23.49 via
    Oracle Open Client Adapter for ODBC 6.0.5.35.0
    Now I have a problem of controlling which form to commit if more than one form are opened.
    E.g. I need to open 2 forms (eg. A, B) and only want to commit the changes made on Form A
    1.
    I open the forms using the follows (i can't use OPEN_FORM('A', SESSION); since mySQL doesn't support)
    OPEN_FORM('A');
    OPEN_FORM('B');
    2.
    then I changed both forms
    Now the :SYSTEM.FORM_STATUS, :SYSTEM.RECORD_STATUS, :SYSTEM.BLOCK_STATUS are 'CHANGED'
    3.
    I then press my custom save button on form A (triggers KEY-COMMIT). Inside KEY-COMMIT, it calls COMMIT_FORM, then triggers
    ON-COMMIT eventually. In ON-COMMIT, i use the built-in COMMIT to commit the changes.
    Then I found that :SYSTEM.FORM_STATUS, :SYSTEM.RECORD_STATUS, :SYSTEM.BLOCK_STATUS are 'QUERY' which is normal. However both
    forms are committed.
    4.
    So I fixed it by: In ON-COMMIT, add RAISE FORM_TRIGGER_FAILURE; after COMMIT. Although it stops committing changes on another
    form. But :SYSTEM.FORM_STATUS, :SYSTEM.RECORD_STATUS, :SYSTEM.BLOCK_STATUS are still 'CHANGED'. Then I do a EXECUTE_QUERY
    after COMMIT_FORM to change back :SYSTEM.FORM_STATUS, etc to 'QUERY'
    5.
    It works. Only Form A is committed. However when Form A has a lot of records (eg. >500), it affects performance.
    Does anyone know how to solve this problem?
    Any help would be greatly appreciated
    Peter

    The question is not how you disable a key, it might be more how to disable a functionality. What functionality do you want to disable? By default F5 maps to the KEY-MENU-trigger, if thats the function you want to disable, write a NULL; in the KEY-MENU-trigger.

  • Show the alert 'Do you want to save the changes? after entering each record

    Hi,
    Is there a way to show the alert 'Do you want to save the changes you have made?', after entering each record.
    i.e. as soon as a record is entered, user should be prompted to 'Do you want to save the changes?' the record when they move to the next record.
    I used the below code in Post-Record rigger. Prompt was diplaying fine as per the requirement,but record was not being saved.
    DECLARE
    n_button_selection INTEGER;
    BEGIN
    if :System.Record_Status='INSERT' then
    fnd_message.set_string('Do you want to save the changes?');
    n_button_selection := fnd_message.question('Yes', 'No','Cancel', 1, 2,'question');
    IF n_button_selection = 1 THEN
    forms_ddl('commit_FORM');
    ELSIF n_button_selection = 2 THEN
    RAISE form_trigger_failure;
    ELSE
    NULL;
    END IF;
    end if;
    END;
    I used forms_ddl('commit_FORM') to commit the record. Because we can't us Do-key('commit_form') in post-record trigger. But forms_ddl('commit_FORM') is not working. So can anybody please give some idea regarding this.
    --

    Forms_ddl issues dynamic sql - you cannot call another builtin (like commit_form) within forms_ddl. Check form_status after the call and you will see that it failed.
    Moreover, forms is not able to execute the post and commit process if you issue "forms_ddl('commit');", so this will not be a solution either.
    You could use the When-New-Record-Instance - Trigger, which allows restricted built-ins to be executed, and issue do_key('commit_form');". However, you would have to check the :system.block_status or :system.form_status, because :system.record_status will already hold the new record number.
    Regards,
    Gerd

  • PDE-PXC002 Program unit exception aborted due to unhandled exception (10050

    Im working on performing a new query when a user changes the value of a text item and then keys to the next item.
    Its very much in experimental stage atm but this is the code:
    BEGIN
         CLEAR_BLOCK(NO_VALIDATE);
         IF :system.block_status = 'CHANGED' THEN
              enter_query;
         END IF;     
    execute_query;
    END;
    When I run this in debugger the following warning is displayed, when I reach the line "enter_query":
    PDE-PXC002 Program unit exception aborted due to unhandled exception (100500).
    I have searched around but found nothing regarding this error message. Am I making a fundemental error here?

    Difficult to assess with the provided information - may I ask you to provide an extract of the PL/SQL code or feel free to contact us via http://pitss.com if you would like to discuss this rather over the phone. Thx MD

  • How to quit the QUERY STATUS please?

    When I execute a query and fail to find the result, the FORM_STATUS is QUERY. And so I cannot close the query and do other things. ABORT_QUERY do not change the FORM_STATUS.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by FEROZ KHAN ([email protected]):
    Exit_Form;
    Will work.<HR></BLOCKQUOTE>
    Thanks. But then I have to write codes like these:
    If :System.Block_Status = 'QUERY' Then
    Exit_Form;
    End If;
    If does not look formal, and sometimes it do exit the form, which is not the thing I want to. I only want to get the :System.Block_Status to NOMAL. Do you have any other way?
    Thanks again.
    null

  • FRM-41106 You cannot create records without a parent record.

    Hello!
    Forms 6i.
    I have a Parent-Detail-Relationship. At the Detail-Block a "When-create-record" sets some default values on the Detail-Block.
    I got error "FRM-41106 You cannot create records without a parent record" when the Parent-Block executes a execute_query.
    I debuged the problem an found out, that the error appears in the standard-programunit "Clear_All_Master_Details".
    The error appears, when the code is deleting the detail-block "code: Clear_Block(NO_VALIDATE)".
    This is strange: The error appears only when I uses the "When-create-record"-trigger on the detail-block.
    If a comment out the trigger, no error appears.
    Why Is a "When-create-record"-trigger initiated when deleting the detail-block?
    Default-Code of "Clear_All_Master_Details":
    -- Clear all the detail blocks for this master without
    -- any further asking to commit.
    currel := Get_Block_Property(trigblk, FIRST_MASTER_RELATION);
    WHILE currel IS NOT NULL LOOP
    curdtl := Get_Relation_Property(currel, DETAIL_NAME);
    IF Get_Block_Property(curdtl, STATUS) <> 'NEW' THEN
    Go_Block(curdtl);
    Check_Package_Failure;
    Error appear here----> Clear_Block(NO_VALIDATE);
    IF :System.Block_Status <> 'NEW' THEN
    RAISE Form_Trigger_Failure;
    END IF;
    END IF;
    currel := Get_Relation_Property(currel, NEXT_MASTER_RELATION);
    END LOOP;
    Thx in advance,
    Wolfgang

    Wolfgang,
    To be honest, I've always done this kind of thing in the Pre-Inse rt or Pre-Upda te triggers. Why is it so important for the user to see the value of these field BEFORE the IN SERT or UPDAT E? Once the record is commited, they will see these values in your form. In my experience - users are typically satisfied with this approach. If your users are not OK with this approach, perhaps you could us a When-Validate-Record trigger instead of the When-Create-Record trigger.
    I think the When-Create-Record option would still work, but your code will need a little tweak. Give the following a try:
       IF ( NVL(:termin.best_nr,'MSTR') = NVL(:pos.best_nr,'DTL')
            AND NVL(:termin.best_jj,'MSTR') = NVL(:pos.best_jj,'DTL')
            AND NVL(:termin.best_pos,'MSTR') = NVL(:pos.best_pos,'DTL') ) THEN
           <<...set_values..>>
       END IF;Remember, NULL values do not always get evaluated correctly so it is always best to use the NVL function to ensure fields are evaluated correctly.
    BTW, you indicated that you ran DEBUG on your trigger, when your IF statement was evaluated did the "set_Values" section of your code run? If it didn't - do you have other code in your WCR trigger that is setting values outside of your IF statement?
    Craig...

  • Query on Co-ordination Operation -Go_Record

    I've a Master database block and it is having only one record.For the Master Block,Details block was created with the Co-ordination Property-Defered:NO and Automatic Query:NO.
    After using POST command,I'm using GO_BLOCK and GO_RECORD on master block in Key-Commit Trigger, at the time :system.form_status was in QUERY and Detail Block status was QUERY.
    Question:
    When i issue GO_RECORD on master block,ON-CLEAR-DETAILS trigger was getting fired and which inturn clears the detail block.
    My Understanding:
    Co-ordination Event should occur only when the event makes a different master record as the current record, in the Master Block.In my case I've only one master record so the GO_RECORD on master block to the same record should not cause Co-ordination Event to occur.
    Can any one help?
    Edited by: user13806434 on Jan 20, 2011 3:27 AM
    Edited by: user13806434 on Jan 20, 2011 4:59 AM

    Hi,
    Thanks.
    But..,
    This scenario was different. In Key-Commit trigger, I’m capturing the :System.Cursor_Record and :System.Cursor_Block to a variable inorder to store the current cursor placement at the time of commit and after doing all the validation on other blocks, I’m asking the system to go back to the same block using the value of the variable which has the initial cursor block and record value.
    When user keeps the cursor at the master block and does the commit, value of the variable will be the master block. So the GO_RECORD of master block clears the value in the detail blocks. If the cursor is on other than the master block, System does not clear the detail block.
    Here we can’t restrict user from placing the cursor and also GO_RECORD is used in *‘n’* number of places in the key-commit trigger based on many situation.
    My Questions:
    1)Will the GO_RECORD on master block will fire the Co-Ordination Event even if the master block has only one record?
    Also I’ve confirmed that the master block is having only one record by checking: SYSTEM.Last_Record value after the GO_RECORD statement.
    2)As I said: I'm Using the GO_RECORD of master block after the POST command, the Form Status and the Block Status of Master & Details
    block will be QUERY
    As the Block status was in Query, System does not re-query the record after the block is cleared.
    Below code is System generated code in CLEAR_ALL_MASTER_DETAILS
    currel := Get_Block_Property(trigblk, FIRST_MASTER_RELATION);
    WHILE currel IS NOT NULL LOOP
    curdtl := Get_Relation_Property(currel, DETAIL_NAME);
    IF Get_Block_Property(curdtl, STATUS) <> 'NEW' THEN
    Go_Block(curdtl);
    Check_Package_Failure;
    Clear_Block(NO_VALIDATE);
    IF :System.Block_Status <> 'NEW' THEN
    RAISE Form_Trigger_Failure;
    END IF;
    END IF;
    currel := Get_Relation_Property(currel, NEXT_MASTER_RELATION);
    END LOOP;
    As the Clear_Block(NO_VALIDATE); clears the detail block and the Block status is in Query so RAISE Form_Trigger_Failure is called.As the result the detail block was not populated after the clear block statement.
    Can u clarify me on this?.
    Edited by: user13806434 on Jan 20, 2011 5:02 AM
    Edited by: user13806434 on Jan 20, 2011 5:11 AM

  • Poor memory or poor documentation?

    This might be no more than a failure of my memory, but I can't figure out what the up statement in the following does:
         IF :System.Record_Status = 'NEW' THEN
              vRecNum := :System.Cursor_Record;
                   up;
         END IF;
    I can't seem to find any documentation of this as a valid PL/SQL statement, but it obviously is-this compiles without error (although the form as a whole generates an error, possibly caused by whatever this statement does).
    thanks.

    :System.Record_Status and :System.Cursor_RecordThese are Oracle Forms internal system variables. A search of the Forms Help system would have given you all the information you need about these variables. For example; Start the Forms Help system, Click on the Index tab and type "System" in the search field...
    SYSTEM.RECORD_STATUS System Variable
    Syntax
    SYSTEM.RECORD_STATUS
    Description
    SYSTEM.RECORD_STATUS represents the status of the record where the cursor is located. The value can be one of four character strings:
    CHANGED - Indicates that a queried record's validation status is Changed.
    INSERT - Indicates that the record's validation status is Changed and that the record does not exist in the database.
    NEW - Indicates that the record's validation status is New.
    QUERY - Indicates that the record's validation status is Valid and that it was retrieved from the database.
    Usage Notes
    Both SYSTEM.RECORD_STATUS and the GET_RECORD_PROPERTY built-in return the status of a record in a given block, and in most cases, they return the same status. However, there are specific cases in which the results may differ.
    SYSTEM.RECORD_STATUS can in certain cases return a value of NULL, because SYSTEM.RECORD_STATUS is undefined when there is no current record in the system. For example, in a When-Clear-Block trigger, Oracle Forms is at the block level in its processing sequence, so there is no current record to report on, and the value of SYSTEM.RECORD_STATUS is NULL.
    GET_RECORD_PROPERTY, on the other hand, always has a value of NEW, CHANGED, QUERY, or INSERT, because it returns the status of a specific record without regard to the processing sequence or whether the record is the current record.
    SYSTEM.RECORD_STATUS Examples
    Assume that you want to create a trigger that performs a commit before clearing a Changed record. The following Key-CLRREC trigger performs this function.
    IF :System.Record_Status IN ('CHANGED', 'INSERT') THEN
       Commi t_Form;
    END IF;
    Clear_Record;Related topics
    GET_RECORD_PROPERTY built-in
    SET_RECORD_PROPERTY built-in
    SYSTEM.BLOCK_STATUS examples
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.
    Edited by: CraigB on Jan 7, 2011 2:24 PM

  • Item Changed Status on a block

    Hi:
    I want to run when-validate only if an item status has changed to 'Modify'. How can I get the status. Is there any other better way to do this. Any Suggestions?
    Thanks in Advance
    Alok

    Hello !
    In Oracle Forms, you can check form status by (:SYSTEM.FORM_STATUS) and block status by (:SYSTEM.BLOCK_STATUS) from CHANGED to QUERY status .
    example :
    IF :SYSTEM.FORM_STATUS = 'CHANGED' THEN
    -- Display a message or ALERT box.
    MESSAGE ('Do you wish to save your changes?');
    END IF;
    Regards
    Omar

Maybe you are looking for

  • Games windows minimized using FX 5200

    I have bought a MSI Geforce FX 5200 card (128 MB) less than a year ago. I noticed when I want to play games like Need for Speed underground, the game starts and is immediately minimized. There is no way I am able to maximize the game window.     Have

  • J1INCHLN - remittance items - export to excel

    Dear All, While creating Remittance Challan through J1INCHLN, system lists out the documents that can be remitted. To reconcile the documents picked with TDS account balance, we are manually comparing each document & finding out if any doc is not pic

  • How do read  windows file properties?

    I want to be able to read the size of the file on disk - no the size of the file using file.length() which only gives the size of the file in bytes. also i want to be able to read anyother info that the os is keeping on a file. so, how can i do this?

  • The backup location does specified does not contain any backup. Specify another backup location.

    We have our server set to backup to an internal HDD (E:), and then copy all the files in E: to different locations for storage (a NAS for instance).  I scheduled a copy to a USB drive, but I can't get the recovery wizard to see the backup it now cont

  • Acrobat 11.0.09  (Mac) scales down everything larger than A4

    Acrobat 11.0.09  (Mac) scales down everything larger than A4 when printing to print area (inside to printable area - XEROX 7760),  scaling is set to none, print is set to actual size. I.e. printing A3 on SRA3 scales the content to the printable area,