AnsweredAssumed Answered

Use a local variable in send mail message body

Question asked by HB on Mar 2, 2016
Latest reply on Mar 2, 2016 by monkeybreadsoftware

I want to use one send mail script for many different situations. I would like to use a text variable that is preset prior to calling the send mail script so that Filemaker evaluates the text in the variable at run time.

 

For instance

 

If $a = 1

     set variable $txt = "Hello " & Contacts::NameEntire & ", hope all is well. Thanks Mr " & Contacts::NameLast...

Else if $a = 2

     set variable $txt = "Hello " & Contacts::Name & ", hope you like the " & Contacts::Product...

...

End if

Send mail [...message: Evaluate($txt)...

 

 

I have tried working a few variations of the above with no success...thanks in advance

Outcomes