Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Inserting a field into an EMail message body

Featured Replies

Hey guys, I know this has been asked before but Ive gone through all pertinent posts and Im still having no luck getting this to work.

Here's the deal, very simple I know... I am using the SendMail function in a script, everything works great but for the body of the email, I want it to say something along these lines:

Hi <<Contacts::FirstName>>,

Thanks for joining our mailing list!

Sincerely,

Blah blah

The only problem is I cant figure out how to do this w/ calculation fields even though everyone says that is the thing to do. Could someone please just be super kind (and patient B)) enough to list out the steps to make this happen? I just need it to pull the contact's name from the current record's "FirstName" field and plug it into some generic paragraph I'll be using for everybody. Thank you sooo much!! If there's an easier way than calculated fields by all means share.

  • Author

UPDATE: Ok, so I found out it was just a problem in syntax... So I was wondering, are there any special characters that tell FileMaker to skip down a line so that the letter is formatted properly? Right now its just clumping everything together... thanks for putting up w/ newbie B)

Create a calculation field.

EmailBody =

"Hi " & Contacts::FirstName & "," & "

Not quick enough.

A carriage return inside quotation marks will drop to the next line.

"

  • Author

Thanks Mark, that carriage return did the trick... Your post was crystal clear and now I'm getting deeper w/ mass mailings sending out a similar letter to request volunteers based on their skillset that is inputed in the database... Basically I'll do a find for electrician experts, say 10 records come up as qualified contacts, then i want to click a button, run a script, and all 10 get a generic email w/ their name plugged in asking for volunteer help...

I noticed I can check off the box "Send to all records in found set" underneath the CC: in the SendMail script setup... well this works great, but the body has only the first record's name listed. Therefore everybody's getting an email that says "Hi Mark" which is no good... Any ideas on keeping the letter customized to each person it is sent to? Sorry to pick your brain so much... Thanks again all of this help is greatly appreciated!

If for some reason this cant be done w/ a simple calculation field can you point me in the right direction?

Matt

  • Author

Ok, so once again I came out of my thoughtless stupor and found a way to work it using the loop function... For anyone out there that cares this is the rough pseudocode of the script I made for mailing to multiple people without showing all people receiving the email in the To: field. Granted this is slower and not brilliant, but it works nonetheless...

Go to Record(first)

loop

sendmail (did NOT check "send to all browsable records" under the To: field)

go to next (Until last one is displayed)

end loop

exit script

Take care guys, thanx again for putting up w/ the learning curve here. I promise to get smarter B) or atleast quieter, :

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.