dbTalk Databases Forums  

Escape $ to insert the actual vaue of the variable in Send Mailscript step

comp.databases.filemaker comp.databases.filemaker


Discuss Escape $ to insert the actual vaue of the variable in Send Mailscript step in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Diego B
 
Posts: n/a

Default Escape $ to insert the actual vaue of the variable in Send Mailscript step - 10-11-2009 , 04:20 PM






Hi all,

I have a very simple script (FM 10 adv Win XP) that is supposed to
send a mail regularly, and it works fine.
I would like to insert some numbers in the body of the mail. These
numbers are stored in 2 variables:

$NbNewRecords (= SomeField)
$NbGrandTotal (= SomeOtherFiled)

The message would be something like:

"Hello, in the last month we had $NbNewRecords enrollments, thus to
date, the total number is $NbGrandTotal"

Obviously, I would like to replace the $... with the actual number but
I cannot get it.
I tried different escape characters: \, ", or "" but I get something
like:

$NbNewRecords
$NbGrandTotal

or

"$NbNewRecords"
"$NbGrandTotal"

Might you help in this ?

Thanks always !

Diego

Reply With Quote
  #2  
Old   
Grip
 
Posts: n/a

Default Re: Escape $ to insert the actual vaue of the variable in Send Mailscript step - 10-11-2009 , 07:07 PM






On Oct 11, 3:20*pm, Diego B <messa... (AT) yahoo (DOT) it> wrote:
Quote:
Hi all,

I have a very simple script (FM 10 adv Win XP) that is supposed to
send a mail regularly, and it works fine.
I would like to insert some numbers in the body of the mail. These
numbers are stored in 2 variables:

$NbNewRecords (= SomeField)
$NbGrandTotal (= SomeOtherFiled)

The message would be something like:

"Hello, in the last month we had $NbNewRecords enrollments, thus to
date, the total number is $NbGrandTotal"

Obviously, I would like to replace the $... with the actual number but
I cannot get it.
I tried different escape characters: \, ", or "" but I get something
like:

You don't need to escape the variable, you're combining text strings
with variables. Concatenation is handled with an ampersand:

"Hello, in the last month we had " & $NbNewRecords & " enrollments,
thus to date, the total number is " & $NbGrandTotal "."

G

Reply With Quote
  #3  
Old   
Your Name
 
Posts: n/a

Default Re: Escape $ to insert the actual vaue of the variable in Send Mail script step - 10-11-2009 , 07:16 PM



"Grip" <grip (AT) cybermesa (DOT) com> wrote

On Oct 11, 3:20 pm, Diego B <messa... (AT) yahoo (DOT) it> wrote:
Quote:
You don't need to escape the variable, you're combining text strings
with variables. Concatenation is handled with an ampersand:

"Hello, in the last month we had " & $NbNewRecords & " enrollments,
thus to date, the total number is " & $NbGrandTotal "."
Oops! A typo - you left out one concatenation & just before the "." at the
end.
i.e.
Hello, in the last month we had " & $NbNewRecords & " enrollments,
thus to date, the total number is " & $NbGrandTotal & "."


Helpfull harry )

Reply With Quote
  #4  
Old   
Diego B
 
Posts: n/a

Default Re: Escape $ to insert the actual vaue of the variable in Send Mailscript step - 10-12-2009 , 07:42 AM



On Oct 11, 7:16*pm, "Your Name" <your.n... (AT) isp (DOT) com> wrote:
Quote:
"Grip" <g... (AT) cybermesa (DOT) com> wrote in message

news:124cf4b5-a075-4cc7-aa0b-8cc30a3ba72f (AT) o9g2000prg (DOT) googlegroups.com...
On Oct 11, 3:20 pm, Diego B <messa... (AT) yahoo (DOT) it> wrote:



You don't need to escape the variable, you're combining text strings
with variables. *Concatenation is handled with an ampersand:

"Hello, in the last month we had " & $NbNewRecords & " enrollments,
thus to date, the total number is " & $NbGrandTotal "."

Oops! A typo - you left out one concatenation & just before the "." at the
end.
i.e.
* * *Hello, in the last month we had " & $NbNewRecords & " enrollments,
* * *thus to date, the total number is " & $NbGrandTotal & "."

Helpfull harry *)
Great !
Thank you so much for the advice, it works like a champ : )

Diego

Reply With Quote
  #5  
Old   
Bizouman
 
Posts: n/a

Default Re: Escape $ to insert the actual vaue of the variable in Send Mailscript step - 10-12-2009 , 08:19 PM



On 12 oct, 08:42, Diego B <messa... (AT) yahoo (DOT) it> wrote:
Quote:
On Oct 11, 7:16*pm, "Your Name" <your.n... (AT) isp (DOT) com> wrote:



"Grip" <g... (AT) cybermesa (DOT) com> wrote in message

news:124cf4b5-a075-4cc7-aa0b-8cc30a3ba72f (AT) o9g2000prg (DOT) googlegroups.com...
On Oct 11, 3:20 pm, Diego B <messa... (AT) yahoo (DOT) it> wrote:

You don't need to escape the variable, you're combining text strings
with variables. *Concatenation is handled with an ampersand:

"Hello, in the last month we had " & $NbNewRecords & " enrollments,
thus to date, the total number is " & $NbGrandTotal "."

Oops! A typo - you left out one concatenation & just before the "." at the
end.
i.e.
* * *Hello, in the last month we had " & $NbNewRecords & " enrollments,
* * *thus to date, the total number is " & $NbGrandTotal & "."

Helpfull harry *)

Great !
Thank you so much for the advice, it works like a champ : )

Diego
Is there any way to add the variable into merge field ??

<<table::field>> & $variable <<table::field2>> ???

Or it's another no do with FM10 and will be in FM12 ?? :O)

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.