Hi db_dev, welcome to technet!
Do you have filemaker pro advanced?
What errors are returned when you run the script through script debugger? Have you stepped through script debugger to see at what point it fails?
What are the contents of the "mail" script?
What do you mean by "it doesn't like the perform script"?
FM Pro Advanced... YES
the error message: The specified field cannot be found and it hilites Perform Script
Mail is a simple MAIL TO. If the field is filled, the trigger is to send an ALERT email.
If I just run the Mail script, it works fine.
The IF..THEN doesn't work.
Which event are you using to trigger the field script? Are you using OnObjectModify or OnObjectValidate?
Hmmmm neither... I guess this is the problem.
Never tried these.
Does your full script look like this?:
If [YourTable::Violation Date > 0]
Perform Script ["Send Mail"]
Btw, without more context, isnt the violation date always > 0? Newbie.....just wondering.....
The Violation Date is empty until filled.
If filled, an email should trigger a warning.
That is the full extend of it.
So, the minute a valid date is put in that field, an email should go out to a specified individual. The email script is called Mail.
If I just run mail, that works perfectly.
I can't wrap my head around the code to trigger the email from the empty field. Sorry for being THICK. I am new to this type of scripting.
Well, try and try again until you succeed!
I just figured this out on my OWN!! LOL
Thanks everyone for your input.
I used OnObjectValidate and it worked.
self-solving is the best solving, because you'll never need to ask for the same answer again
Best of luck.