Oracle Forms (Developer 6i) [message #80052] |
Wed, 07 August 2002 13:49 |
Eddie
Messages: 23 Registered: January 2001
|
Junior Member |
|
|
I'm having trouble creating a trigger that inserts the current date (sysdate)automatically when I scroll past the last record, into an empty set of fields. I've tried the WHEN-NEW-RECORD-INSTANCE & KEY-SCRDOWN triggers with the following PL/SQL code-> :WHSVIST.WHSVIST_DATE := sysdate;
to no avail.
I'm also having a little trouble doing calculations from within forms. I'm trying to multiply a qty item with a price item (in different data blocks) and have the product displayed along with other database records. I've enabled the formular calculation mode in the property palette and entered the following formular-> :WHSSTDR.WHSSTDR_QTY * :WHSDRUG.WHSDRUG_COST
where WHSSTDR & WHSDRUG are the datablocks/underlying tables. Nothing shows up as the result/product, on the form.
Any help will be greatly appreciated.
Sincerely,
Eddie.
|
|
|
Re: Oracle Forms (Developer 6i) [message #80053 is a reply to message #80052] |
Wed, 07 August 2002 15:56 |
ram kumar
Messages: 113 Registered: August 2002
|
Senior Member |
|
|
hi,
to assign sysdate automatially do one thing
when create record block level tigger
:WHSVIST.WHSVIST_DATE := sysdate
thats solve the first problem
for second problem yount use formula column based on items in diff blocks as you specified
the best way to do is
to get product do it in post query....of the block
and when validdate item...
update me if u have any probs in doing it
|
|
|
Re: Oracle Forms (Developer 6i) [message #80066 is a reply to message #80052] |
Thu, 08 August 2002 01:39 |
Tejpal Saraswat
Messages: 22 Registered: August 2002
|
Junior Member |
|
|
Hi Eddie
for ur 1st problem better u put the code in Pre-Insert trigger on the block level like :Block_name.Column_name := sysdate
for ur 2ns problem better u put the fromula in the apropriate trigger like When-New-Record-Instance or like so u can try with using the bind variables.
best regds
Tej
|
|
|