Jump to content

Handling Crashing Problems


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

Recommended Posts

My Print Script has some fields which are set prior to completion of the Print script after which they are reset.The Problem is if the Print Job fails then the Flags remain set and effects the functioning of the remaining record.How do I provide a handle if the print job crashes??Hope you might have got at what I am trying to get at

Thank You

Link to comment
Share on other sites

Ok let me get this clear.I have a flag in each record.A Script sets the flag on the records based on a find criteria,does a print and then resets those flags.Now those flags are used in other scripts to perform other functions.

Everything is fine when the scripts run fully,but I had a problem,when the script was executing in the Print Job the system crashed(might have been hardware error).Now when I restarted the system the flags for those records are in the set stage.It didn't complete the script.So I had to manually go to those record and change it.This is Ok as I have the admin pwd,and these flags are not on layouts.What happens when a user is using it and the script executes partially?The flag is set when u create a new record

[ September 27, 2001: Message edited by: Jacob ]

Link to comment
Share on other sites

Thank You,This is what I did ,I had a Script which went to the last record,then used the Status(CurrentRecordId) to find the Id of the record,otherwise u don't know where the last record is and stored it into a global field ,and then compared each record id from the first to find end of records using Status(CurrentRecordId) and set the flags for each of the records to default state.I perform the script on opening the file and when creating a new record.I think this solves the problem

Link to comment
Share on other sites

You'll need some kind of maintainence script to clear/reset the flags. You could do this on startup, or before a find is performed, or some other logical spot to insure that the flags are in the state that you want them, before the state is changable by the user.

Something else to consider is the use a global multikey field, rather than flags. This gives you only 1 field to worry about and allows you to use relationship functions on the set rather than loops or replaces.

However this kind of thing is not persistant, so if you need the flags to remain in thier state from session, you cannot do it this way.

Link to comment
Share on other sites

Whenever I run a script that makes use of a general purpose flag field, I never make any assumptions about the initial state. In other words, clear the flag field in all records at the start of the script before you do anything else. That way, if another previous script terminated abnormally with the flags in disarray, it won't matter.

BTW, when I used to run FM 3, it often crashed during printing, but I have never had a problem with FM 5

Link to comment
Share on other sites

This topic is 7327 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.