1 Reply Latest reply on Jun 30, 2017 1:48 PM by philmodjunk

    Help with Script-Education


      Hello everyone!

      I'm new to this Filemaker thing, and I'm trying to write a very complex script that can do the following (complex for me).

      To give some background, I have a report that I run from another database on a daily basis. This report includes dates that students made a request, instructors name/email/course.

      I import this report, and for any new records that are added, i need an email to go out. Can I create an email template in Filemaker that can pull information from specific fields? Such as an instructor email address from each record, to include: Dear instructor, This is to inform you that "student name" in your "course" is requesting blah blah blah.


      Thanks for any help with this! Like I said, this is all new and I'm trying to be more efficient with my time and automate some things.

        • 1. Re: Help with Script-Education

          This can be done and in more than one way.


          Inside the send mail dialog that you open from the send mail script step, you can click the button next to the body text box with the black triangle to open the calculation editor and you can build a calculation there that combines literal quoted text with data from the current and related records. You can also reference fields to get email addresses and use this same method to construct the subject:


          "Dear instructor, This is to inform you that " & Enrollment::student name & " in your " & Enrollment::courseName & " is requesting blah blah blah"


          This is the simplest approach, but requires developer intervention anytime the basic message text needs to be altered. A more complex set up is to put the above text into a text field in a record and then use the Substitute function to insert data from your solution into the text from this text field. This allows non-developers to make minor updates to the basic message without having to ask the developer to make the change. The text in such a text field might look something like this:


          Dear instructor, This is to inform you that <<StudentName>> in your <<CourseName>> is requesting blah blah blah