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!

Creating Record ____ of _____ for Found Sets 1

Status
Not open for further replies.

jtflex

Technical User
Feb 20, 2004
32
US
Hi Everybody,

I am having a problem creating what I thought would be a simple field display.

I've disabled the Sidebar and have buttons that go to the previous and next records on found sets. I also created two fields to display the format: Record ____ of _____.

I can't get the first field to work correctly. I created it as a number field and in the script after performing a find, I insert a calculation with: Status(CurrentRecordNumber)on that field.

I get a return of numbers that appear to be the order the record was created and not from the found set.

Any ideas what I doing wrong?

I'm using FM 6 on an IBM. Bye the way, the second field works correctly (I made it a global field with the calculation Status(CurrentFoundCount).

Thanks,
Joe
 
One way to go:

A calc field recInfoShow - text - unstored =

"Record " & zc_recNumber_cnu & " of " & zc_recFound_cnu & " Found ... " & zc_recCount_cnu & " Record" & Case(zc_recCount_cnu > 1;"s") & " Total"

Where zc_recNumber_cnu = calc - number - unstored = Status( CurrentRecordNumber)
zc_recFound_cnu = calc - number - unstored = Status( CurrentFoundCount)
zc_recCount_cnu = calc - number - unstored = Status( CurrentRecordCount)

This will give you the information :'Record 1 of 2 Found ... 2 Records Total'

Feel free to adapt the text.

HTH
 
Just to clairfy what you wrote;

I created a field and called it "Item Number Found". It is a Number type field.

This is the field that list each record number in the found set as I browse through them.

In my Find Script I wrote:

SetField["Item Number Found","Status(CurrentRecordNumber)"]

Right now, it only return the number "1" on the first record in the found set and the rest are blank.

The second half of this Found Script has:
SetField["Number Found","Status(CurrentFoundCount"]

This one works fine.

Any ideas of what I'm doing wrong?

Thanks,

Joe
 
Ah ha!,

I just re-read your post again and saw I left out the unstored part and text.

It works now.

Thanks a million JeanW,

Joe
 
Hi Joe,

That's why I use the suffix with my fielddefinitions:

fieldName_cnu : c= calculation, n= result number, u= unstored.

fieldName_cti : c= calculation, t= result text, i= indexed.

With the combination prefix and suffix you can 'see' what the result has to be....
Easy to troubleshoot weeks/months after you made the application.....

Glad it worked for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top