Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Going to a specific record in a list block

Status
Not open for further replies.

jquaid

IS-IT--Management
Aug 7, 2001
15
IE
Hi,
I have a screen which displays 15 records (out of a possible 100,000). The user is able to change the Sort order and filtering of these records by selecting from dropdown lists on the top of the screen.

After a re-Sort, I want to bring the user back to the record they had selected before the Sort (similar to how Microsoft Outlook sorts).

I can bring the user back to the same position - using system.trigger_record and go_record, but haven't found a way of finding the position of the old selected record in the re-sorted list - apart from:
having a database procedure with dynamic sql
running the same query that is populating the screen
reading through the cursor
finding the position of the record.
...not very efficient.

Is there an easy way of doing this - some kind of Find_Record built-in?

Any help would be greatly appreciated,
Thanks,
Jeremy
 
No, you should build your own.
In fact, if you change order and requery block, ther's a posibility that your old record no nolger exists (or was changed), so in general there's no common way to find it. If you have PK, you may loop through records by next_record untill you find the one with the stored PK. Though, for large sets it may need a lot of time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top