Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6731 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hey gang,

Is there a symbol or merge to insert the total records in a table onto a layout. I thought I saw something like that somewhere. I have @@ for the record but I want it to have @@ out of ?. Can this be done?

Thanks

Mike

Posted

You would think so, but no, you need to create an unstored calculated field:

Get ( FoundCount )

-- or use a script to set that calc into a global.

Posted

AS Fitch said an unstored calculated field; Here's the calc as supplied to me by another on this forum:

If(

$$FoundCount ≠ Get(FoundCount);

Let($$FoundCount = Get(FoundCount);

zippScript_PerformScript( Get(FileName); "Refresh" )

  )

)



&



Let([

$$ActiveRecord = Get(RecordID);

Tc = Get(TotalRecordCount)];

"Record " & Get(RecordNumber) & "  of " & " " & $$FoundCount & If($$FoundCount ≠ Tc; "  Found"; " total")

)

You must also download the free plugin "ZippScript."

http://homepage.mac.com/WebObjects/FileSharing.woa/wa/default?user=jkornhaus&templatefn=FileSharing3.html&xmlfn=TKDocument.3.xml&sitefn=RootSite.xml&aff=consumer&cty=US〈=en

HTH

Al

Posted

I'm not sure what specific problem you're trying to solve with that calc + plugin, but it's not necessary to do all that just to display the found count on a layout.

Posted (edited)

Er, you could also use Fitch's original suggestion:

Get ( FoundCount )

without the script (you forgot to include what the "Refresh" script does) or plugin...

*apologies bout the overlap

Edited by Guest
overlapped post
Posted

I have @@ for the record but I want it to have @@ out of ?. Can this be done?

This gives you "Record # NN of NN records which I believe is the question. If I'm not mistaken Get ( FoundCount ) just gives you a number.

Also want to correct myself. I got the formula from Ray Cologon at Nightwing Enterprises.

"The technique uses an embedded script trigger (via the free zippScript plug-in developed by John Kornhaus) to refresh the screen when the found set changes. If necessary, the plug-in may be downloaded by visiting the Resources page on the NightWing Enterprises web site at:

http://www.nightwing.com.au/FileMaker/Resources.html "

The field can be placed on any layout, on a portal, a list view or a standard form layout and it will tell you what record you are on and how many records in the found set.

Posted

... i use this all the time on all my layouts seeing as i detest the filemaker nav... plus i needed more room:

"Record: " & Get(RecordNumber) &

If(Get(FoundCount) ≠ Get(TotalRecordCount) ; "¶Found: " & Get(FoundCount) ; "" ) & "¶Total: " & Get(TotalRecordCount)

Which returns a string such as the following when you are looking at the foundset:

Record: 1

Found: 3

Total: 17

when all records are being displayed:

Record: 1

Total: 17

Then again, you could use Record X of X which would just be "Record " & Get(RecordNumber) & " of " & Get(FoundCount) - but i find this isn't as clear.

Either way you have to use an unstored calc field and aldipalo i'm still confused what your trying to do and why your using variables and apparantley a script to achieve this...

~Genx

Posted

You are right I did have a shortened version which I should have displayed.

Let([

Fc = Get(FoundCount);

Tc =Get ( RecordNumber )];

"Viewing " & Tc & " of " & Fc) &

" records."

which doesn't need the plug-in and works just fine as well.

Posted

I don't really think using a let function is entirely necessary in this case, but each to his own i suppose.

Posted

Look, the OP just wants to show the found count. ALL you need is a calc field, let's call it... I don't know... "FoundCount"... The calc? Get ( FoundCount ). Make sure it is UNstored.

Now you can put on the layout: "Record @@ out of <>" and you're all done.

These pretzels are making me thirsty!

This topic is 6731 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.