mmonsalveg Posted August 1, 2012 Posted August 1, 2012 Hello , i like to know to create a server script that send emails to people that havent complete the delegate task? i had already setup SMTP email , and works well , but im stock in writing the script since filemaker server does not let to save as pdf on the server . thank you
Kris M Posted August 1, 2012 Posted August 1, 2012 You can save documents on server . in windows save to fms machine: C:Program FilesFileMakerFileMaker ServerDataDocuments on mac their is a similar folder location but i dont use mac so i dont know the details
mmonsalveg Posted August 1, 2012 Author Posted August 1, 2012 Hello Kris, thanks for your reply , my filemaker server is on windows server, about saving on pdf ,, what script should i use? because " save as pdf " is disable for server use . please let me know , thank you
bcooney Posted August 1, 2012 Posted August 1, 2012 The suggested practice if you need an unattended PDF creator is to setup a "robot" client. That is, a dedicated FM client that runs a looping script, because you cannot create PDFs with a scheduled script on FMS. I would revisit the requirement to send a PDF. Can you put all the info in the body of the email? If so, then you can have a FMS scheduled script that sends the "reminder" emails.
mmonsalveg Posted August 1, 2012 Author Posted August 1, 2012 Hello bcooney , thanks for your advice. i would like to know how to put specific info on the body ? i mean , how to put the pdf info on the body part? i been tryin to do that but i cant figure out how to find specific info like " uncompleted tasks"
bcooney Posted August 4, 2012 Posted August 4, 2012 Sorry for the late response. I don't know what tables you have and how they are related, but it looks as if you have a People table and a Tasks table. I would imagine that tasks have a Date_Completed, and that you are interested in listing the incomplete tasks in the email. Given this, you would create a script that finds all incomplete tasks, and then goes to the related People records ( read up on Go To Related Records, Match Found Set). Use the List function to create a calc field, result text, that gathers the incompleted tasks for each Person in a field in People. I usually create a calc field in tasks, "msg_text", that concatenates the fields I wish to include in my list into a string. For example, msg_text = TaskDueDate & " " & TaskName & " " & ClientName. Use this "msg_text" in List ( people_Tasks~open::msg_text ). Also, you'll need to define a relationship btw People and Tasks that limits the records seen thru the relationship to only their incomplete tasks. I'd have a flag field in Tasks, flag_Open, that is a calc, if (isempty (Date_Complete). I'd use this flag on the right-side of the relationship "people_Tasks~open). I'll try to put together a demo early next week.
bcooney Posted August 5, 2012 Posted August 5, 2012 Demo attached. Quick and dirty, but shows the concepts. TasksSample.fp7.zip
mmonsalveg Posted August 6, 2012 Author Posted August 6, 2012 bcooney , thank you very much ... i just adapt your sample into my database and it works like a charm!!!.
Recommended Posts
This topic is 4845 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 accountSign in
Already have an account? Sign in here.
Sign In Now