Home » Developer & Programmer » Forms » Tabular Form Top Record (Oracle Forms 6i)
Tabular Form Top Record [message #512924] Wed, 22 June 2011 17:28 Go to next message
AramDerian
Messages: 6
Registered: June 2011
Location: LACMTA
Junior Member
I have a data block with hundreds of records. I display data from the block on a tabular form. One of the items on a block is a "Employee Id". I also have a search button on a form. It lets the user enter "employee Id" and press the search to find the employee in a tabular list. Everything works just fine FIRST_RECORD and NEXT_RECORD commands do the job of finding. When the "Employee Id" is found I use Go_Item to focus on a found record. My question is how to make the found record to be the top/first item displayed in a tabular form. I spend two days searching forums for the answers. Unfortunately this is a user requirement and I must find a solution.
Re: Tabular Form Top Record [message #512930 is a reply to message #512924] Wed, 22 June 2011 18:28 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
Top of the records currently on screen or first record in the block?
Re: Tabular Form Top Record [message #512932 is a reply to message #512930] Wed, 22 June 2011 18:36 Go to previous messageGo to next message
AramDerian
Messages: 6
Registered: June 2011
Location: LACMTA
Junior Member
currently on screen
Re: Tabular Form Top Record [message #512980 is a reply to message #512932] Thu, 23 June 2011 03:05 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
You could use next_record and prev_record to move past the record so that it goes to the top and then go back. You'd need to do some basic maths based on the number of rows in the block and the number displayed on screen.
However if the record is near the end of the current set it won't work (If you have 10 records in the block, 10 being displayed at any one time and they want the 8th you can't get it to the top of the screen).
In that case your only option would be to requery the data with an order by that puts the appropriate record first.

Personally I think this requirement is more trouble than it's worth.
Would the users accept instead you highlighting the record with a different visual attribute?
Re: Tabular Form Top Record [message #513238 is a reply to message #512980] Fri, 24 June 2011 16:25 Go to previous message
AramDerian
Messages: 6
Registered: June 2011
Location: LACMTA
Junior Member
Thx. Next_record and Previous_record did the job.
Previous Topic: Forms 10g Form Run time Settings
Next Topic: restrict standard save functionality
Goto Forum:
  


Current Time: Tue Sep 10 09:13:11 CDT 2024