Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Forms 4.5 - Help!!!
On Mon, 28 Jul 1997 23:12:15 -0600, faisalr_at_swbell.net wrote:
>A) In a library management system different books are issued to the
>members and certain books are returned by the members. The system is
>developed in forms 4.5. Presently, there is no validation for issue
>date and return date. Need to write VALIDATION CODE. If the return date is
>smaller than the issue date a message should be displayed indicating
>the error before going to the next record. Need a sample validation code
>and the NAME of the TRIGGER used.
A when-validate-item trigger on both date-fields or a
when-validate-record trigger on the block. Both dates can
changed; no testing when one of the items is null or use a
nvl-function in your test.
In the trigger(s) code something like:
if nvl(:block.issue_date, trunc(sysdate)) >
nvl(:block.return_date,trunc(sysdate)) then
message('Return-date must be later then issue-date');
raise form_trigger_failure;
end if;
>B) A goods company maintains its inventory system in Oracle Forms. In the
>data entry module, a small window appears if the operator enters the
>wrong code. Recently, a lot of new items have been added with their code.
>You are requested to update the system in such a way that it should take
>care of the item codes as well as well as future expansion. The user of
>the system will be happy if they are allowed to edit the text field in
>Notepad. What will you do to keep the user happy?
To easy enter (and test) the item-codes: a LOV (list of values) on the item-code field; create LOV -> select item_code, item_description
into :block.item_code, :block.item_description from item_code_table;attach LOV to item-code; this is one of the item-properties. You can use this LOV for validation or use your own code, when using your own code, you must write a when-validate-item trigger on item-code field.
To use Notepad as an editor:
attach the system-editor as an editor to item-code;
default "system-editor" is Notepad; you can use
another editor by changing the forms45_editor in
oracle.ini (16-bits) or registry (32-bit).
What about the assignment? ;-)
Lucy Received on Thu Jul 31 1997 - 00:00:00 CDT