Oracle Form 中的旧值和新值

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12606881/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 01:07:57  来源:igfitidea点击:

Old and new values in Oracle Form

sqloracleplsqloracleforms

提问by Nacho321

I'm working with Oracle Forms. I have a field named SOLD_TO_CUST_PARTY_NAME. I have to execute a process if I detect a change in the field's value. I tried using when_validate, but it's executed even if you just click the field and move to another field (validation ALWAYS occurs whether you change the value or not). Is there anyway I can check :oldand :newor something similar to execute a process only if the field is modified?

我正在使用 Oracle Forms。我有一个名为SOLD_TO_CUST_PARTY_NAME. 如果我检测到字段值的变化,我必须执行一个过程。我尝试使用when_validate,但即使您只是单击该字段并移动到另一个字段,它也会执行(无论您是否更改该值,都会进行验证)。无论如何,只有在修改字段时,我才能检查:old:new或类似的东西来执行流程吗?

EDIT:Can't use personalizations. It has to be done with pl/sql.

编辑:不能使用个性化。它必须用pl/sql.

回答by Laggel

There is a property called database value that let you check if the field has been modified and if it has not you just have to exit the validation trigger.

有一个称为数据库值的属性,可让您检查该字段是否已被修改,如果没有,您只需退出验证触发器。

Ex.

前任。

    BEGIN

    IF :BLOCK.ITEM = GET_ITEM_PROPERTY('BLOCK.ITEM', database_value) THEN
     RETURN;
    END IF;

     /* VALIDATION */

    END;