dbTalk Databases Forums  

Record Number x of Y

comp.databases.filemaker comp.databases.filemaker


Discuss Record Number x of Y in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Falcon
 
Posts: n/a

Default Record Number x of Y - 09-20-2005 , 02:39 PM






I seem to be strugling with this and I can't see why!

I want to return two values, the current number of records matching a find
(Y) and the number of the record being looked at out of the current found
set (X)

X = it's position in the list
Y = the number of finds.

I thought it would simply be a matter of using:

Get(FoundCount) for the number of records found and...

Count of ContactID (Summary)

This does not appear to be producing the correct results, can someone
enlighten me please?

Cheers

Falcon



Reply With Quote
  #2  
Old   
Falcon
 
Posts: n/a

Default Re: Record Number x of Y - 09-20-2005 , 03:05 PM







PS I'm using FM 8 - I can't find status flag in FM 8!



Reply With Quote
  #3  
Old   
A Lawrance
 
Posts: n/a

Default Re: Record Number x of Y - 09-20-2005 , 04:12 PM



Falcon wrote:
Quote:
PS I'm using FM 8 - I can't find status flag in FM 8!


Record <<@@

will display the record number for each record in the found set.


Reply With Quote
  #4  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: Record Number x of Y - 09-20-2005 , 04:14 PM



As I already answered here on Sept8, in the thread "Re: Page x of y in
FMP6 (the "y" part)?" :

The idea is to include in the script (FMP6) that launches the printing
the following lines :

Preview mode
Go To record (last)
Set field(gPage, Status ( CurrentRecordCount )
Go To record (first)

and put in merge mode gPage after the 'of' : "Page ## of <<gPage>>".
Remi-Noel

"Falcon" <info (AT) getlost (DOT) com> a écrit :
Quote:
I seem to be strugling with this and I can't see why!

I want to return two values, the current number of records matching a
find (Y) and the number of the record being looked at out of the
current found set (X)

X = it's position in the list
Y = the number of finds.

I thought it would simply be a matter of using:

Get(FoundCount) for the number of records found and...

Count of ContactID (Summary)

This does not appear to be producing the correct results, can someone
enlighten me please?

Cheers

Falcon




Reply With Quote
  #5  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Record Number x of Y - 09-20-2005 , 11:33 PM



In article <tzZXe.1197$WV1.274 (AT) fe2 (DOT) news.blueyonder.co.uk>, "Falcon"
<info (AT) getlost (DOT) com> wrote:

Quote:
I seem to be strugling with this and I can't see why!

I want to return two values, the current number of records matching a find
(Y) and the number of the record being looked at out of the current found
set (X)

X = it's position in the list
Y = the number of finds.

I thought it would simply be a matter of using:

Get(FoundCount) for the number of records found and...

Count of ContactID (Summary)

This does not appear to be producing the correct results, can someone
enlighten me please?
This is easy-peasy, but does have one trick to it.

In pre-7 version of FileMaker the position of the current record in the
Found Set (X) is obtained using Status(CurrentRecordNumber), while the
total number of records in the Found Set (Y) is obtained using
Status(CurrentFoundCount).

This means you can have one Calculation field that combines them:

"Record Number " & Status(CurrentRecordNumber)
& " of "
& Status(CurrentFoundCount)

Presumably in FileMaker 7 and 8 these are probably now something like
Get(RecordNumber) and Get(FoundCount), but unfortunately I still
haven't used FileMaker 7.

BUT,
the trick is to make sure that the calculation field(s) using these
functions are Unstored so that they continually update. (The "Storage
Options" button is at the bottom-right of the window where you enter
the calculation.)


Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #6  
Old   
42
 
Posts: n/a

Default Re: Record Number x of Y - 09-21-2005 , 02:07 AM



In article <cYZXe.1229$WV1.427 (AT) fe2 (DOT) news.blueyonder.co.uk>,
info (AT) getlost (DOT) com says...
Quote:
PS I'm using FM 8 - I can't find status flag in FM 8!
They renamed the status functions in FM7. They are now get().

So you want

Get(RecordNumber) for "x"

and

Get(FoundCount) for "y"

to display "record x of y"


Reply With Quote
  #7  
Old   
Falcon
 
Posts: n/a

Default Re: Record Number x of Y - 09-21-2005 , 04:23 AM



Thanks everyone!

Sorted!



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.