![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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: |
#3
| |||
| |||
|
|
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 "." |
)
#4
| |||
| |||
|
|
"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 * ) |
#5
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |