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.

script that does a find, and not records are found.and prints, when

Featured Replies

I have to do a series of finds, and then print different letters (layouts), to patients. But, if one of the finds in the script does not match (find) any records (and the foundset=0), then the print command interupts the script and says something like the the print command can not be completed.

Is there a way to have the script skip the print command when no records are found, and there is nothing to print? So, the script does not stop and another find is performed as per the remaining script steps. And, then if records are found, prints appropriate letters.

You might want to consider making a script that contains sub-scripts, each with your different find requests. At the end of each sub-script, you could put a Show All Records step, and then the next sub-script could start on your database. If you do this, you'll have to have each sub-script perform the find, print the records for those that match the find, and then show all records so the next sub-script could perform its find and repeat the process.

I would suggest posting a sample script that you have so that the vast wealth of knowledge in this forum can help you more specifically. There are many very FileMaker-savvy people in this forum that have helped me greatly, and they will help you too.

Ken

  • 3 weeks later...

Originally posted by sock:

[QB]I have to do a series of finds, and then print different letters (layouts), to patients. But, if one of the finds in the script does not match (find) any records (and the foundset=0), then the print command interupts the script and says something like the the print command can not be completed.

Is there a way to have the script skip the print command when no records are found, and there is nothing to print? So, the script does not stop and another find is performed as per the remaining script steps. And, then if records are found, prints appropriate letters.

Maybe this helps:

Switch on "Set Error Capture"

Add after the step where you perform the find: If Status(CurrentError) = 401 (No matching records found) then exit the script.

I hope i'm using the correct FM syntax, because i'm using a dutch version.

Erik

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.