On Tue 17-Jun-03 11:44pm -0400, Anirban Das wrote:

> I wanted to do conditional attachment in TB. I gave the following
> command in the template

> %if:"%AbTOCountry"="a":"%attachfile=^d:\temp\acentres.xls^":"%-
> %if:'%AbTOCountry'='b':'%attachfile=^d:\temp\acentres-intl.xls^'

> I am trying to do group mailing. Nothing is attached to any of the mails
> fulfilling any of the 2 conditions. Can someone tell me what is wrong in
> the above command.

Well, you're missing a `"` at the end of the second line.

But I've tried the following:

   %AttachFile=^c:\a^%-
   %if:"%AbToCountry"="a":"Country A":""%-

It attached the file and printed "Country A" since 'a' was in the
country code.  I then replaced those two lines with:

   %if:"%AbToCountry"="a":"%AttachFile=^c:\a^":""%-

It failed to attach the file, just like in your example.  So confirmed
here.

> Also if i have to have around 10 if statements one
> after the other what do i use instead of the " and ' .

I had asked Stefan about the parser (in the Beta list).  In his
response, he included the following valid quote characters:

quotechar     = '"' / "'" / '/' / '_' / '+' / '\' / '#' / '~' /
                '*' / '$' / '@' / '!' / '`' / '^' / '&' / '-' /
                '.' / '|'

Note, the released version may be different.

-- 
Best regards,
Bill


________________________________________________
Current version is 1.62r | "Using TBUDL" information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to