Post-change trigger alternative

db and dev 10g rel2 ,
hi all ,
i want same functionality of using post-change trigger in 10g ?

newbi_egy wrote:
It would be easier to answer, if you would tell us what exactly is your problem. What does not work? What to you want to achieve?i've said before , how to get the same functionality of post-change trigger ?
and i said that post-change trigger fires under these situations :
the post-change trigger fires under these situations :
1- The Validate the Item process determines that an item is marked as Changed and is not NULL.
2- An operator returns a value into an item by making a selection from a list of values, and the item is not NULL.Above two points also done by When-Validate-Item trigger. so it's an alternative of Post-Change.
3- Oracle Forms fetches a non-NULL value into an item. In this case, the When-Validate-Item trigger does not fire. If you want to circumvent this situation and effectively get rid of the Post-Change trigger, you must include a Post-Query trigger in addition to your When-Validate-Item trigger. See "Usage Notes" below.
but when-validate-item trigger does not satisfy all these situations .Only point 3 are not satisfied by When-Validate-Item trigger. for this you need Post-Query trigger.
It's just another clarification of Andreas answer.
Hope it's clear now.
Hamid

Similar Messages

  • Post-change trigger problem

    I have problem with post-change trigger, i'm using Forms 10g
    I have two block, one is database block and the other is non-database block for example A is Nondatabase block and B is Database block, I have written commit_form built-in in Key-Next-Item of a item in B(database) block. When it is getting executed commit_form built-in firing the post-change trigger of a item in A(Non-database) block. I dont know why it is firing and I dont want the post-change trigger to fire (we are not assigning any value to that item in A block during commit_form).
    Can anybody help me on this..
    Regards
    Radha

    when you issue a commit_form, forms will validate all items in all blocks which re not valid at that moment. This also occurs for non-database-block.
    The question is why is the item not valid ? Are you putting something in it in some other trigger? If so, you could explicitly set the itemstate to valid with a
    SET_ITEM_PROPERTY('BLOCK.ITEM', ITEM_IS_VALID, PROPETY_TRUE);btw.. you should not use the POST-CHANGE-trigger for validations etc. its better to use the WHEN-VALIDATE-ITEM-trigger.

  • Post-change trigger raising when query!!

    this trigger is form related: i just attach a post-change trigger with an item.
    contains the following code
    declare
    name varchar2(50);
    name1 varchar2(50);
    begin
    name1 :='%'||:BLK_EMP_MST.FATHER_NM||'%';
    select first_nm INTO name from hrt_emp_mst
    where father_nm like name1;
    if(name is not null) then
    MESSAGE(name||' has same father name');
    MESSAGE('WARNING');
    end if;
    exception
    when no_data_found then
    null;
    end;
    it working fine when we insert a new record. but when i query for record, it fires, which should not be

    I agree with Manu, rather than use a Post-Change trigger to validate user input, use the When-Validate-Item (WVI) trigger instead. This will allow you to validate the input from a user, but the WVI trigger won't fire when a record is queried into your block.
    @Manu
    POST-QUERY is kept only for backward compatibility in 10gI think you meant to say "Post-Change" instead of "Post-Query." The Post-Change trigger has been depricated, but the Post-Query trigger is still valid in all Forms versions.
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • FRM-40735: illegal restricted procedure COMMIT in POST-CHANGE trigger

    I am using forms6i. I have three text fields FL1 ,*FL2* , FL3 in a form. Cursor passes from FL1 to FL2 and FL2 to FL3. I want when cursor transfers from FL1 to FL2 the form should be saved(commit). On FL1 i put COMMIT; in post-change.
    But when I pressed Enter key on FL1 it gives following error message.
    FRM-40735: illegal restricted procedure COMMIT in POST-CHANGE trigger
    Can you help me doing this.

    Gul wrote:
    I am using forms6i. I have three text fields FL1 ,*FL2* , FL3 in a form. Cursor passes from FL1 to FL2 and FL2 to FL3. I want when cursor transfers from FL1 to FL2 the form should be saved(commit). On FL1 i put COMMIT; in post-change.
    But when I pressed Enter key on FL1 it gives following error message.
    FRM-40735: illegal restricted procedure COMMIT in POST-CHANGE trigger
    Can you help me doing this.You cannot use COMMIT_FORM in post-change trigger. Because post-change only accept UN-restricted procedure. and commit is not.
    try this
    /* Trigger KEY-NEXT-ITEM on every item and write sample code */
    commit_form;
    next_item;Hope this works..
    Hamid
    Mark correct/helpful to help others to get right answer(s).*

  • Post Change trigger issue

    I placed a post change(Item level) trigger to LOV enable item(deptno) and insert the following code there.
    But as expected other block items (dname, loc) of dept block won't come to the form once change the LOV.
    ------------------ code --------------------
    BEGIN
         SET_BLOCK_PROPERTY('dept',DEFAULT_WHERE, 'deptno = ' || :dept.deptno);
         EXECUTE_QUERY;
    END;
    Any solutions
    thax
    Shabar

    shabar,
    the EXECUTE_QUERY cannot be given in POST-CHANGE Trigger.
    I think your requirement is this.
    some departments were already saved.
    if some one tries to create new department with old deptcode, then the actual department details should retrieve.
    if this is the case, then, give the code in the KEY-NEXT-ITEM Trigger.
    and if the deptno field is varchar, then u have to change the code like this,
    DECLARE
    CURSOR Cur_Dept IS SELECT DEPTNO FROM DEPT WHERE DEPTNO = :DEPT.DEPTNO;
    Str_Deptno VARCHAR2(20);
    BEGIN
    IF :DEPT.DEPTNO IS NOT NULL THEN
    OPEN Cur_Dept;
    FETCH Cur_Dept INTO Str_Deptno;
    IF Str_Deptno IS NOT NULL THEN
    SET_BLOCK_PROPERTY('DEPT', DEFAULT_WHERE, 'DEPTNO = ''' || :DEPT.DEPTNO || '''');
    CLEAR_BLOCK(NO_COMMIT);
    EXECUTE_QUERY;
    END IF;
    END IF;
    END;
    Its better to check whether the DEPTNO is valid or not.
    Regards,
    Manu.

  • POST-CHANGE TRIGGER

    Hi,
    I am using Forms Version 9.0.4.0.19.
    I created a form which consists of two blocks. Both blocks have a database field called city_code. I am trying to create a post-change trigger that would display the description and not the code of the city. Unfortunately, I keep getting no records found when I run the form although I now for certain there are records, there are records when I remove both triggers.
    Here is my code for the trigger for block1:
    =======================================================
    BEGIN
         SELECT DESCRIPTION
         INTO :INST.txtCITY
         FROM DICT
         WHERE CODE = :INST.CITY_CODE
    END;
    =======================================================
    Here is my code for the trigger for block2:
    =======================================================
    BEGIN
         SELECT DESCRIPTION
         INTO :CONTACT.txtCITY
         FROM DICT
         WHERE CODE = :CONTACT.CITY_CODE
    END;
    =======================================================
    Thanks in advance.
    VC

    Hi Again,
    I thought it worked, it didn't give me an error when I compiled it, but when I ran the form the data didn't appear. Below is my code, can somebody please help?
    DECLARE
         CURSOR LOOKUP_INST_TYPE IS SELECT DICT.DESCRIPTION
         FROM DICT
         WHERE DICT.CODE = :INSTITUTION.INST_TYPE
         AND DICT.TOPIC = 'INST_TYPE';
    BEGIN
         OPEN LOOKUP_INST_TYPE;
         FETCH LOOKUP_INST_TYPE INTO :INSTITUTION.TXTINST_TYPE;
         CLOSE LOOKUP_INST_TYPE;
    END;

  • JClient equivalent post-change trigger and JTextField issue.

    Hi,
    JClient 10.1.2
    What is the equivalent event listener I could use to obtain the forms post-change functionality?
    With following components:
    JTextField
    JComboBox
    JCheckBox
    For example on a JComboBox I would like to display a warning message dialog if a special value has been selected.
    I've tried using itemStateChanged method on a combo box but the message dialog is displayed everytime the row gains currency.
    Should I use focusGained to store the previous value and in the focusLosted method, check for a change?
    What would you recommend?
    One more question on JTextField, what is the method to track "global changes".
    I've tried using the DocumentListener, but the methods changedUpdate,insertUpdate and removedUpdate are fired on each keyboard action.
    Is there a way to track "global changes" on the whole text?
    Thanks
    Frederic

    You can work at setAttribute (Vo or Entity) level.
    You should be carefull, however, because in a cliente server environment it looks like the forms post-change event but in a 3 tier J2EE environment it's a server event and is not possible to interact with the screen in processing that event.
    Any other comment is wellcome.
    Bye
    Tullio

  • Cannot use GO_ITEM, GO_BLOCK in POST-CHANGE

    It is quite difficult to control the flow if I cannot use GO_ITEM, GO_BLOCK in POST-CHANGE trigger, is there alternative way?

    This really is an old chestnut. In the days of character mode many people used to put such code in key-triggers, which meant large numbers of triggers, possible loopholes, and a nightmare when it came to conversion to mouse navigation.
    After using various methods in the past, I have now standardised on using a FORM-LEVEL WHEN-NEW-ITEM-INSTANCE trigger in all of my new forms. Although I originally did this because I wanted to highlight the current field, I have since found it very useful for doing other things. If I want to navigate as a result of WHEN-VALIDATE-WHATEVER I set a variable to the name of the item I want to go to (could use a global but I prefer packaged variables). The W-N-I-I trigger reads the variable and does the GO-ITEM (and of course nullifies the variable).
    I also agree with Steve, POST-CHANGE is oldy-fashioned and not really the right thing to use.

  • Master-Detail Form - implementing some thing like Post-Query trigger

    Hi all,
    I am struggling to implement an eqivalent of a post-query trigger in Oracle Forms. Please bear with me as I am trying to explain in detail what the problem is.
    Here is my situation.
    I have three tables EMP, DEPT and LOCATION. I created a Master/Table pages on EMP and DEPT.
    Basic relationships.
    Each LOCATION has one or more DEPTs; Each DEPT is at one and only one LOCATION.
    Each DEPT has one ore more EMPs; Each EMP is assigned to only and only DEPT.
    Not getting too complicated, here are the table layouts:
    LOCATION:
    ID number(10,0) not null,
    NAME varchar2(20) not null
    DEPT
    ID number(10,0) not null,
    NAME varchar2(20) not null,
    LOC_ID number (10,0) not null foreign key from LOCATION
    EMP
    ID number(10,0) not null,
    NAME varchar2(20) not null,
    DEPT_ID number (10,0) not null foreign key from DEPT
    Assume I have all the constraints, BIU triggers, sequences defined properly.
    I am using the APEX page wizard to create a Master/Detail Form on DEPT and EMP. The first page is the Master Report on DEPT. I want to display the Location Name on this page also. Because the Master Report allows
    you to change the query, I was able to add the Location Name as part of the
    query. This was very simple.
    Select a.name "Department_Name",
    b.name "Location"
    from dept a, location b
    where a.loc_id = b.id
    Moving on, In the Master Detail Form, I would like to get the Location Name as part of the first Region (Dept Region).
    In this region, I would like to include the Location Name also. So my first region on the Master Detail form includes:
    Dept Id: ________
    Dept Name: _______
    Location Name: __________
    As Region are automatically populated using using a Fetch Row from EMP table (Automated Row Fetch) on an After Header process point, I don't have a way of including the Location as part of query. So I created a Region level Item called Location Name, made it Display only.
    In the old SQL*Forms, or Oracle Forms days, I used to use a Post-Query trigger, or Post-Change trigger to fire on the Loc_Id column to populate the Location Name. Simple fetch like:
    Select name
    into :P80_location_name
    from location
    where loc_id = :P80_loc_id
    However, I am struggling to implement some thing simple like this in APEX. Tried creating a processes, computatations etc, but nothing is working.
    I have seen some previous responses to fetching values from a foreign table
    using a button or AJAX script, but this should be very basic. What am I
    missing here?
    Appreciate any insights.
    Thanks.
    John

    Hi John,
    I'm not too familiar with the post-query triggers in Oracle Forms, but the use of a List of Values (LOV) on your LOCATION table might do the trick for you. If you create a dynamic LOV based on your LOCATIONS table, it can then be referenced by the LOC_ID item on the Master-Detail page, to display the Location Name. You could try doing the following:
    1. Create a new dynamic LOV, LOCATIONS, using a query similar to the following:
    select Name d, ID r
    from LOCATION
    order by 1
    2. Edit the "Create" button on the Master report page, and in the "Optional URL Redirect" section set "Request" to CREATE. Click Apply Changes, to save the setting.
    3. Edit the LOC_ID item on your Master-Detail page, and set the following:
    * in the "Name" region change the "Display As" setting to Select List
    * in the "Label" region change the Label to Location Name.
    * in the "List of Values" region set the "Named LOV" to LOCATIONS
    * in the "Read Only" section, set the condition to Request != Expression 1, and set Expression 1 to CREATE.
    Click Apply Changes to save the settings.
    When you run the pages now, the Location Name field will appear as Read-Only when editing a selected Master row. The item will appear as a Select List when the user clicks "Create" on the Master page, to create a new Master row.
    I hope this helps.
    Regards,
    Hilary

  • What's wrong with "Post-Change" anyway?

    Post-change has been fading out since Forms 4.5 (maybe earlier). We are now supposed to use "WHEN-VALIDATE_ITEM" AND "POST-QUERY" to do the same job.
    Our company uses Post-change a lot to complete description fields (example: "Unit Description" for the "UNIT_CODE" field on "SALE". When the user enters a new UNIT_CODE OR a UNIT_CODE is returned from a query, we use POST-CHANGE on UNIT_CODE to populate the (non-base table) UNIT_DESCRIPTION field). We have hundreds of occurrences like this in our application.
    Now Oracle want to make us use two triggers when one is perfectly sufficient for the job but is now being phased out. This means we will need to either duplicate the code ("select unit_descr into :sale.unit_description from unit where unit_code = :sale.unit_code;") in two triggers or create a separate function and call it from both triggers. Neither of these options sounds good to us.
    Can anyone explain why post-change is being phased out? Will it ever actually go? (It's still there in Forms 9i)
    Cheers,
    Tim.

    Tim,
    From what I remember (it's been a while since I've done any Forms) the Post-Change trigger doesn't fire if the Item is set to NULL.
    This is fine when getting data back from the server; non-database items are populated correctly, and NULL values don't trigger any form of action.
    But, if during data input the user sets and item to NULL the Post-Change trigger does not fire, and so doesn't clear out you non-database item, or do whatever else you wanted.
    If you have the opportunity I would recommend changing the code to use When-Validate-Item and Post-Query. As you say, you don't want to duplicate code, so you'll need some common functions.
    An approach that I favour is to create one package per database block, with one procedure per item, into which you can pass an "Event Name". eg: for the EMP block...
    Post-Query:  begin
        emp_pkg.latest_hire_date('POST-QUERY');
      end;When-Validate-Item:  begin
        emp_pkg.latest_hire_date('WHEN-VALIDATE-ITEM');
      end;emp_pkg Package:  package body emp_pkg
      is
        procedure latest_hire_date
          ( p_event in varchar2 )
        is
        begin
          if (p_event = 'POST-QUERY')
          then
          elsif (p_event = 'WHEN-VALIDA[i][pre]Long postings are being truncated to ~1 kB at this time.

  • Sir how I avoid I this error FRM-40735: POST-QUERY trigger raised unhandled

    Hi master
    Sir this error crate may problem for me
    FRM-40735: POST-QUERY trigger raised unhandled exception ORA-01403
    sir how I avoid I this error and show my message
    or system not show this error and bypass this error
    please send me code how I avoid this error
    thanks
    aamir

    There may be many causes of this error. You better diagnose and remove them.
    1- A field length may be less than what your query return a data into it.
    2- A POST-CHANGE trigger on any data may return un-desired data (character into numrice field, longer value than a field etc).
    likewise.
    Regards
    Sayeed
    [email protected]

  • Post-query trigger ? save changes?

    I have a similar problem to that posted by 'nova' on Dec. 27, 2000. I have a form generated by Designer. The problem is that upon subsequent querying (F8 pressed twice), it asks me if I want to save my changes, when I have not made any changes.
    I looked in the generated code for the post-query trigger and found SET_RECORD_PROPERTY(:SYSTEM.TRIGGER_RECORD, 'NEW_CUST', STATUS, QUERY_STATUS) which is apparently not the problem, according to this prior post. I am at a loss and have tried everything I could think of.
    What else could be causing this? I checked to see if there were any items being set in the property sheet to default values, and removed the defaults - that did not work.
    ??? I would greatly appreciate any assistance. Thanks.

    Hi Pina,
    my similar problem I have solved like this:
    Post-Record trigger:
    BEGIN
    *** this is important to test the record status - without this I had the same problem
    IF :SYSTEM.Record_Status='INSERT' THEN
    IF :TRANZIT_ZADAJ.ID_SADZBY_TV_PRENOSOV IS NULL THEN
    :TRANZIT_ZADAJ.ID_SADZBY_TV_PRENOSOV:=:SADZBY_ZADAJ.ID;
    END IF;
    END IF;
    END;
    You can check Pre-... and Post-... triggers
    if there are any items being set to any values.
    I hope this will help you.
    Helena

  • Can we change the alternative COA after transaction data posting

    Hi Friends,
    My client has wrongly updated the GL account in alternative Chart of accounts column in Company code segment. They didnt realise and they posted some transaction data as well.
    Today they realised and tried to change the alternative COA and it showed an error message "GL account balance is not zerowised". They tried to clear the GL account balance, but couldnt solve the issue.
    Please let me know is there any other way to change the alternative COA after entering the transaction data.
    Thanks,
    Dwarak

    thnks

  • FRM-40735 POST- UPDATE trigger raised unhandled exception ORA- 01403

    FRM-40735 POST- UPDATE trigger raised unhandled exception ORA- 01403
    I am getting the above error when i am trying to change the Assignment Category field of
    an employee from Junior Staff to Senior Staff.
    Navigation People> Enter & Maintain> (B)Assignment.
    Kindly assist me to resolve this error.
    Plz note there is a promotion that is suppose to be given to some employees in our company as of
    01-APR-2010 so i had to open the closed payroll periods and do the changes. I managed to change for all
    the 9 employees but 1 employee's assignment is giving me an error as follows :
    FRM-40735 POST- UPDATE trigger raised unhandled exception ORA- 01403
    The error displays after i try to save the changes made to the Assignment Category from Junior Staff to Senior Staff.
    NB: i have also tried to switch off the custom code...but its giving me same error.
    Also the element links have been defined for employment category on the links window.
    please help!!
    Edited by: 594647 on Jul 20, 2010 10:26 PM

    Release 12.1.1.
    OS is Red Hat Ent Ed 4
    i am trying to change the employee assignment category from Junior to Senior. so when i am updating the assignment details on the assignment screen (Navigation is People >Enter & Maintain> Assignment) and trying to save, the system gives error on the status bar of the application as follows:
    FRM-40735 POST- UPDATE trigger raised unhandled exception ORA- 01403
    NB: Error is appearing on the Assignment screen.
    Please help!!
    Edited by: 594647 on Jul 21, 2010 2:48 PM

  • No quants exist for posting changes. Creating TOu00B4s in LU04.

    When creating transfer orders in LU04, we get an error message "No quants exist for posting changes'. We are using batch managed and serialized materials. Using QM interface, so, inspection lots are created at Goods Receipt. When QM team "accepts" batch materials during inspection lot, there is no problem, but when "accepts" serialized materials, the system creates posting changes notices but can not create transfer orders sending the message before described. This is because after receiving the serialized materials, we receive one piece at a time in order to create one inspection lot for every serial number. But when we put away the materials, we put them away in the same bin. so, system assigns one quant and one inspection lot to the bin, updating the last one every time we put away one serial number. When system tries to look for the inspection lot number selected in QA32, is not finding it in the bin at WM level because the bin only contains the last inspection lot that was put it away.
    With batch managed numbers there is no problem since SAP divides the bin in different quants with the correspondent batches assigning an inspection lot to each quant.
    Is there any alternative to solve the issue with the serialized materials? We are using SAP ECC 6.0.
    Thanks for any help.

    Hi,
    The reason why we put away serialized materials into the same bin is because materials are physically small and they fit more than one in each bin. The warehouse is structured in this way and we plan to use it like that because it wouldn´t be feasible to create one bin for each serialized material. Is there any other way to manage this situation?
    Thanks in advance.

Maybe you are looking for

  • How to apply a format to all hyperlink in CS4 file

    Hello, this is my first post, We are writing a magazine that we will publish as a PDF. We would like all hyperlink to stand out (we created a character style with these attributes: Candara Bold, Dark Red). The magazine will have a lot of hyperlinks i

  • Video wont transfer to iPod Classic

    Why is this? It transfered before, then I wiped it and now it wont transfer, saying those videos aren't compatible with this version of iPod.

  • Concatenate NUMBER and VARCHAR issue

    I'm trying to concatenate an integer and a string. However, the number that i'm trying to concatenate is the a number returned from the rank function and it's within the context of a CASE statement. I realize that sounds a bit confusing, so here's a

  • Macbook/Mountain Lion Upgrade...

    I ordered a Macbook Pro Retina, and it ships between Aug 2nd - 8th. Will it have Mountain Lion on it when I receive it? If not how will I get the free upgrade to it?

  • Day 1 Questions and Answers

    The following are responses to the questions posted during today's presentation. Enjoy Adam Q<WSI-12> What is the difference between "bind" and "access"? A<WSI-12> Bind is used in a similar manner to JNDI. The client does an appropriate lookup on a S