You need to restrict access to a form. Access must be limited to a particular times of day and to certain authorized users.
You write a procedure (get_authorization) in the form that checks the username of the person logging in and validates the time of day. If the person is not authorized to use the form at that time, the following code is executed:
…
MESSAGE
(‘You are not authorized to access the form at this time’); RAISE FORM_TRIGGER_FAILURE;
What is the best trigger from which to call this procedure? Why?
A.
When-Validate-Item on the first enterable item, because the form will exit without showing the position of fields on the screen or the accompanying prompts.
B.
Pre-Text-Item on the first navigable text item in the first navigable block, because this will trap every user and allow time for the message to be read before exiting the form.
C.
When-New-Form-Instance at form level, because GET_AUTHORIZATION is a restricted procedure and cannot be called from any "Pre" trigger.
D.
Pre-Form at form level, because the form will exit immediately after displaying the message in an alert.
E.
When-Validate-Item at form level, because the message will appear on the message line and must be acknowledged by the user.
F.
Pre-Block on the first enterable block, because this can also be used to set global variables and initialize any parameters needed.