This discussion is archived
9 Replies Latest reply: Mar 24, 2013 6:13 AM by Andreas Weiden RSS

post-change trigger alternative

newbi_egy Explorer
Currently Being Moderated
db and dev 10g rel2 ,
hi all ,
i want same functionality of using post-change trigger in 10g ?
  • 1. Re: post-change trigger alternative
    Andreas Weiden Guru
    Currently Being Moderated
    Use a WHEN-VALIDATE-ITEM
  • 2. Re: post-change trigger alternative
    newbi_egy Explorer
    Currently Being Moderated
    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.

    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 .

    do you mean doing it like so
    if :t != :t 
    then 
    action 
    ?
    and please tell me about the third situation . what does it mean when oracle forms fetches a non-null value into an item ,
    how forms fetches a value , what does this mean ? i mean with a cursor or after execute-query or how ?

    Edited by: newbi_egy on Mar 21, 2013 2:12 PM
  • 3. Re: post-change trigger alternative
    Andreas Weiden Guru
    Currently Being Moderated
    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?
  • 4. Re: post-change trigger alternative
    newbi_egy Explorer
    Currently Being Moderated
    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.

    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 .
  • 5. Re: post-change trigger alternative
    Andreas Weiden Guru
    Currently Being Moderated
    And did you see that the solution is already in the text you copied? Use w WHEN-VALIDATE-ITEM-trigger and for adding lookup-data afetr the query a POST-QUERY-trigger.
  • 6. Re: post-change trigger alternative
    HamidHelal Guru
    Currently Being Moderated
    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
  • 7. Re: post-change trigger alternative
    newbi_egy Explorer
    Currently Being Moderated
    let's talk about it slowly ,please ,

    the first situation is :
    1- The Validate the Item process determines that an item is marked as Changed and is not NULL.
    and you hamid said , that it can be done with when-validate-item trigger . how can this be done ?

    -- second situation
    2-An operator returns a value into an item by making a selection from a list of values, and the item is not NULL.
    you said when-validate-item can do it as well , how ?
  • 8. Re: post-change trigger alternative
    HamidHelal Guru
    Currently Being Moderated
    newbi_egy wrote:
    let's talk about it slowly ,please ,

    the first situation is :
    1- The Validate the Item process determines that an item is marked as Changed and is not NULL.
    and you hamid said , that it can be done with when-validate-item trigger . how can this be done ?
    when-validate-item trigger fires when item is New or Changed validation status

    -- second situation
    2-An operator returns a value into an item by making a selection from a list of values, and the item is not NULL.
    you said when-validate-item can do it as well , how ?
    If my first sentence is true and second also because
    Legal Commands for both is
    SELECT statements,...

    Hope its clear..


    Hamid
  • 9. Re: post-change trigger alternative
    Andreas Weiden Guru
    Currently Being Moderated
    There is no "how" in this. When an item is changed, either programmatically or by user input, and you try to leave that item, the WHEn-VALIDATE-ITEM-trigger fires. Inside you can do your additional checks or whatever you need to do (but did not tell us yet).

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points