Home » Developer & Programmer » Forms » form builder  () 1 Vote
form builder [message #118391] Wed, 04 May 2005 18:52 Go to next message
sam2
Messages: 7
Registered: May 2005
Junior Member
hi

i have a oracle form builder i have created a form for the employees now i want a function to calculate the comision for each employee at the end of the day and insert a new record in another table.

my questions are:

1. does any1 knw how should i do it i mean do i have to create a button and code it there or something else??

2. how can i insert a record in other table??

thanxx
Re: form builder [message #118607 is a reply to message #118391] Fri, 06 May 2005 07:49 Go to previous messageGo to next message
subba lakshmi
Messages: 36
Registered: March 2005
Member
you want to calculate commission at the end of the day.and insert into other table.that should be done through trigger(complex date checking).

from
lakshmi
Re: form builder [message #118615 is a reply to message #118391] Fri, 06 May 2005 08:13 Go to previous messageGo to next message
sam2
Messages: 7
Registered: May 2005
Junior Member
thanx how about if the manager of the store wants to set a bonus where for employee.

because i have to calculate the commission via bonus set. shall i do this with trigers or shall i use text item
Re: form builder [message #118793 is a reply to message #118391] Sun, 08 May 2005 19:46 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Perhaps a button to pop-up a new canvas for adding the bonus and bonus reason, then an 'OK' button to accept tha change and a 'Cancel' button to return without making a change.

Display both the commission and bonus on the main screen but as display fields, not text fields. [Alternatively, so that all the fields have the same visuals, use text fields but will update, insert, and delete properties set to false.]

David
Re: form builder [message #119199 is a reply to message #118793] Wed, 11 May 2005 02:53 Go to previous messageGo to next message
subba lakshmi
Messages: 36
Registered: March 2005
Member
yes you can do that with triggers.as in triggers you will access the value of bonus as :new.bonus and calculate commission accordingly.


from
subba lakshmi
Re: form builder [message #119200 is a reply to message #118391] Wed, 11 May 2005 02:58 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
If you want to run the job daily then you could use DBMS_JOB to invoke a stored package/procedure that is doing the work for you.

This saves having to remember to push a button each day.

David
Previous Topic: Post-select vs Post-Query
Next Topic: NLS_SORT
Goto Forum:
  


Current Time: Mon Nov 04 13:41:49 CST 2024