2

How I can disable F8 in oracle forms? I have developed a form and put verification for the save button. But users bypass this verification by pressing F8 to save the form.

I put my verification check in KEY-COMMIT trigger.

I use Oracle Forms 6i.

7
  • Perhaps it is wise to find why users are cheating your form validation: you may have missed some important understanding of the problem (maybe you are requesting data that is impossible to provide?). Or perhaps there is no keyboard shortcut for 'submit form' and data input people hate reaching for the mouse. Tough to say. But ask around why it happens first. :) Commented Feb 1, 2011 at 8:59
  • 1
    Can't you place your verification logic into a ON-COMMIT Trigger? This should be executed in either way. Commented Feb 1, 2011 at 8:59
  • @zeissS : eemmm would you tell me when system call On-commit?? Commented Feb 1, 2011 at 9:19
  • @sarnold : in 6i version u can not create very userfriendly pages,do u have any idea?even for using color u are limit. Commented Feb 1, 2011 at 9:20
  • 1
    @rima: wiki.oracle.com/page/Firing+Sequence+Of+Forms+4.5+Triggers lists a number of trigger for Forma 4.5 and I guess the mentioned ON-COMMIT works for 6i as well. It should be executed when you have PL/SQL block with COMMIT; or someone presses the commit-key. Commented Feb 1, 2011 at 9:49

1 Answer 1

7

You should not put validation code in the KEY-COMMIT trigger because, as you now know, that is just one way that the form can be committed. In addition to the F8 key it could be that the user exits the form and answers "yes" to "Do you want to save your changes?" and so on.

To validate a record, use the WHEN-VALIDATE-RECORD trigger. To perform more complex validation you can use the POST-FORMS-COMMIT trigger.

I had to deal with a similar problem recently where the developer had put some vital initialision code in the WHEN-BUTTON-PRESSED trigger of an "Enter Query" button. If the user pressed the appropriate key for Enter Query instead, or used the menu, or used the toolbar, the form fell over in a heap.

Sign up to request clarification or add additional context in comments.

1 Comment

In general, validation code should never be in KEY or When Button Pressed triggers because they can be bypassed. Tony is exactly correct. I haven't used Forms in a long time but I remember that this is a Very Important concept to understand.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.