Jump to content
Sign in to follow this  
BowDown

Is there a way to disable buttons till script ends?

Recommended Posts

I have a problem with one of my scripts.

The script does a few things:

-Calls a VBScript w/JobKey passed and this script then visits the job folder, and converts the cad drawings to gif images.

-Goes out to the TAGS table, searches for a job by JobKey, if there's tags it removes them (delete all found records).

-FileMaker then calls an import routine to pull in the tag records from my design software.

-Once done FileMaker searches the new tag records and omits out the records w/valid item keys and whats left it deletes (delete all found records).

This has worked fine in both locations (NY-Database local, PA-Database through VPN), but lately it seems that PA has been having issues w/the VBScript not finishing in time and causing FileMaker to crash. So what I decided to do was to put a 5second pause between steps 1 and 2, and this fixed the issue.

The problem is... if a user doesn't realize the script is still paused, and clicks one of the buttons to return to the orders screen (another table in the same database), the script will blindly continue and deletes all the order records you're currently viewing.

I almost ******* myself when I saw it deleting $250,000 worth the open orders!!!

Any suggestions are welcome.

Thanks!

Edited by Guest

Share this post


Link to post
Share on other sites

You might have your script switch to a layout with nothing on it but a message about being patient while the import takes place. This layout should be based on the same table occurrence as the other one so that the rest of the script works the same.

You should also consider double checking that you're on the right layout before doing your Delete Found Records.

Share this post


Link to post
Share on other sites

That's an idea. I could do both...

Prbly just put a few 'switch to layout:' commands in the script along the way to make sure it's going to remove the correct records.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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