Home » Developer & Programmer » Forms » Need Form6i Triger (oarcle form 6i)
Need Form6i Triger [message #521093] Fri, 26 August 2011 05:01 Go to next message
qaiserjavid
Messages: 25
Registered: May 2011
Location: Pakistan
Junior Member

Friends i need help
i have one project about school system.there is one column of total marks.and other one is position column.i want a trigger that system genrate the position against total marks.

problem is this when total marks become equal for example 101 and 101 than position also same.but dont now what a trigger i write for this.
here some example

if total marks 100 than position is 1st
and if total marks 99 than position is 2nd
but third person is also same number in total marks column i mean 99 than in position column must write the 2nd

please help me
Re: Need Form6i Triger [message #521219 is a reply to message #521093] Fri, 26 August 2011 22:55 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
My Dear friend triggers fire on events like when you press a button or enter into a cnavas or even enter into an item etc. In your case it is scenario or situation and not an event.

So I think you have to first create a logic to handle this situation. And with the help of that logic you should write you code and decide should your code be written in a procedure or function and what event should be used for this code.
Re: Need Form6i Triger [message #521474 is a reply to message #521219] Tue, 30 August 2011 03:53 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Which database version do you use? If possible, use analytic functions (such as RANK and DENSE_RANK) in order to rank students (or whatever you rank). I'm quite sure that you won't be able to use these functions in Forms 6i, but you might create a view whose SELECT statement would return exactly what you are displaying in a form, base form block on that view, and simply execute query in order to populate the block.
Re: Need Form6i Triger [message #521476 is a reply to message #521474] Tue, 30 August 2011 04:32 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
Of course if you follow LF's solution you will have to requery the data every time the total marks are changed to see the revised position.
Not that I can think of a better solution
Re: Need Form6i Triger [message #521973 is a reply to message #521476] Mon, 05 September 2011 05:11 Go to previous message
itech
Messages: 173
Registered: May 2008
Location: Fsd, Pakistan
Senior Member

LF is right, u need not to store the postion in database, instead u can create a view to compute the current postions according to their score, this eliminates the update / delete tackling. as said, u can use rank, and other oracle functions (available according your your oracle version) to rank the students.

and i believe that you want to show the students position in a report, rather than in the feeding form.
Previous Topic: tree in oracle forms
Next Topic: Applying Serial No in detail block
Goto Forum:
  


Current Time: Sat Sep 07 13:05:15 CDT 2024