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

Finding only a certain amount of records

Featured Replies

How can I make a Perform Find script step find only a certain amount of records, say, the most recent 1000 records that otherwise fit the find criteria.

I have started down this path for a solution:

I made a Show Dialog step that asks for the user to enter the number of records to find...lets say they enter 1000.

That number 1000 goes into a global field to be used during the part of the script which says how many records to find.

thats as far as I get :-)

After the Perform Find:

If( Status (CurrentFoundCount) > gHowMany )

. Go to record ( no dialog, gHowMany )

. Omit multiple ( no dialog, 99999999 )

End If

  • Author

Thanks Tom. I don't understand the script but I was excited to try it anyway. but...

I cannot put Status in my script. "This function cannot be found"

what am I doing wrong?

For vs. 7, you would use Get(FoundCount)

  • Author

ah-ha! thanks

JD, here's an explanation of the script:

There is no FileMaker command to find only a certain number of records. So instead, we'll have to Omit the records we don't want from our found set.

If( Get(FoundCount) > gHowMany )

-- Get(FoundCount) is the number of records we just found, or it could be all records, doesn't matter

-- gHowMany is the global field you talked about

-- So for example if you've found only 500 records, there's no need to omit any. ( 500 is not greater than 1000 )

. Go to record ( no dialog, gHowMany )

-- This is actually not quite right. It should be (gHowMany + 1). So if you enter 1000 into the field, you'll go to record 1001.

. Omit multiple ( no dialog, 99999999 )

-- This is just an arbitrarily large number, so that it will omit all the remaining records.

End If

Hope that makes sense to you now. Sorry for the errors.

I believe you must also be sure Set Error Capture [On] is in the script; otherwise, you'll get the FM dialog telling you there aren't that many records. And thanks for the very nice explanation, Tom. I think many people aren't aware of the power of using this. I've rarely used it myself. smile.gif

  • Author

great. thanks Tom. I was not sure if the 9999999 meant something specific. makes sense now. I'm going to try again.

FYI, Omit multiple ( no dialog, 99999999 ) does not require error capture on, the "no dialog" does the trick.

Ahhhhh, makes sense. I've only used this to perform manual omit - no 'No Dialog' displays. That explains the error message then. Thank you, Tom. smile.gif

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.