Dialog Box to Reorder Product

Hopefully this is a simple issue that I am just missing.  

I have a database I am creating in Filemaker Pro 8.5 Advanced.  Users enter data about a product that has to be ground even every so often.  At one point, the product cannot be ground any further.  

I want Filemaker Pro to popup with a dialog box when the product is below a specified diameter.  I have it working to where I have to run the script manually, it exports data to excel file and emails properly.  The only thing not working is getting the script to run on its own when the first if statement is true.  

This is my current script:
If [Mill Roll Tracking DB::Roll Face Diameter After Grind <= Mill Roll Tracking DB::Roll    Reorder Diameter
    Show Custom Dialog ["ROLL REORDER"; "The current roll cannot be ground again.     Please hit SEND EMAIL so that a new roll can be ordered..."]
     If [ Get(LastMessageChoice) = 1]
         Go to Layout ["Mill Roll Tracking DB"]
         Save Records as Excel [Restore;"Roll Reorder.xls"; Current record]
         Send Mail [ No dialog; To: "xx@gmail.com" CC: " xxxx@gmail.com"; Subject: "Roll Reorder; Message: "Please open Excel file below to see which roll needs to be reordered.";
         Exit Script[]
     End If
End If
 Thanks in advance for the help.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Good morning,

FileMaker introduced script triggers in version 10, but there are plugins that will allow a script to run when a condition is met on a field change.

You can check the out DoScript plugin here: http://myfmbutler.com/index.lasso?p=416

It should do what you need.  As far as a built in solution, you might be able to use a button that the user has to click after entering the record or as part of your navigation that will run the script.

Good luck!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FileMaker Pro

From novice to tech pro — start learning today.