0
votes

In Oracle Forms 10g, I have the following code in WHEN-VALIDATE-RECORD trigger.

if(some_condition > 0) then
message('test');
RAISE FORM_TRIGGER_FAILURE;
end if;

Problem is message('test'); appears multiple times. How can I make sure it appears only once.

1

1 Answers

1
votes

The trigger WHEN-VALIDATE-RECORD will go off for the record that needs to be validated after leaving the record or pressing commit.

In your case I assume the message appears after a commit and you changed all your rows or at least more then one in for example the post-query trigger.

Because more then one row is changed the trigger will fire for all of these rows and you will get the message multiple times.

Try just after you query your records without changing anything to commit. It should say there is nothing changed to commit. If it just commit for example 10 rows then this is your problem.