Jump to content
Server Maintenance This Week. ×

how write scripts for filemaker server


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

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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"

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 4280 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
×
×
  • Create New...

Important Information

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