Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

record count insert

Featured Replies

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

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.

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

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.

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

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.

... 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

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.

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

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!

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.