Jump to content

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


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

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 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

Link to comment
Share on other sites

This topic is 7300 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
 Share

×
×
  • Create New...

Important Information

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