I know it sounds like a silly requirement, but my client wants to show the record position as a "page"

In any case, I tried your solution and it works very well.

Thank you very much

Rafael


El 23/03/2015 a las 19:51, Koen Piller escribió:
Rafael,
what is the use? The recordposition in an ordered table is completely
meaningless.
If you realy must now the postiion of your cursor in an ordered table I
would say you will have to build a counter, something in the line of:
lnCounter = 0
go top
do while field=mycondition
lnCounter = lnCounter +1
skip
enddo
? lnCounter
Cheers,
Koen


2015-03-23 23:34 GMT+01:00 Rafael Copquin <rcopq...@fibertel.com.ar>:

I have this cursor containing a list of clients.

If I do not set any order (set order to 0), the records are shown in
physical order, so if I move the pointer 100 positions down, the record
position is given by recno(), in this case it would be 100.

However, if I order the records by company name and move the record
pointer 100 records down, even though the position would be 100 records
from the top, recno() is not going to tell me where I am.

I need to show that I am in the 100dhs position from the top, regardless
of the order.
I am dealing with a table containing 3 million records, and the
requirement is that the record position be shown very fast.

To clarify, I select the table with the 3KK records and try to find a
certain company. Because the table is now ordered by company name, I can't
use recno() to tell in which position the found company is. If I move the
pointer down or up, the position should move one up or down.

For instance, seek 'WIDGET CO'

The actual record number, as per recno() could be 2348897. However that
record position in the cursor could be 1200, if the pointer is moved one
down, the position would be 1201, or if it were to be moved one up, the
position would be 1199.

So, how can I determine the record position as opposed to recno() if the
table is in any particular order, such as company name ?

Is there a function that can be used?

Rafael Copquin


[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/55109d84.1050...@fibertel.com.ar
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to