September 6, 200223 yr This may not be as complex as I'm making it within my own head... but here goes: I have built a forms solution with life cycles and need to send emails within a filemaker script when the life cycle changes. My quick-fix is to use a global field with the email address of each approver that needs to receive the message. What I'd like to do is pull the email address of each approver from a related user table where an approver field is marked true. The relationship is built and works brilliantly as a portal. But how would I be able to use all the related people in a script step for Send Mail? Thanks for your help! It's Friday morning... I've been on this for days, I'm out of Mountain Dew, and my monitor is now cracking where my head has hit it repeatedly.
September 6, 200223 yr I think what you need to do is send the email from the "user table" file. Then you can specify in the Send Email (I'm assuming you are using build-in email and not a plug-in) settings to use a field for every record in the current found set. As an alternative, if you use an SMTP plug-in such as SMTPit, you can use a looping script to add email addresses as destinations. -bd
September 6, 200223 yr One option: create a valuelist, e.g. vl_Approver which draws values from the e-mail address field in the related file, based on the relationship you've already set up. with a script, set the value of your global field to: ValueListItems(Status(CurrentFileName), "vl_Approver") and use the global field as the To: (or cc:, or bcc:) in your Send Mail script. I'm assuming here that you want to send the same e-mail to many people at once.
September 7, 200223 yr If you want to pass values between scripts without resorting to "relationships to globals" and other such work-arounds, check out the shareware plugins "Jazz Globals" or "Jazz Params" at http://www.jazzmedia.com.au/shareware.html John
Create an account or sign in to comment