Hi Isaac,
thanks a lot.

We don't use any form. We get the
data, where to eMail to from the
customer. And this is the reason, we
oversaw that it was "Mrs " instead of "Mrs".
Instead of: Dear Mrs Miller it was Dear Miller
in the eMail. :-)
What I have thought to do is to write
a check routine to check if the right title/adresses
attributes/permutation is found in the field and if
not mark the field as bad.

Uwe

-- -- -- -- -- -- -- -- -- -- -- -- -- 
Sunday, June 15, 2003, 3:53:45 AM, haben Sie geschrieben:

>> Hi list, I am using the following
>> term to start an eMailing
>> to customers.

>> Dear <cfif title EQ "Mrs">Mrs. <cfif degree NEQ
>> "">#degree#</cfif></cfif>
>> <cfif title EQ "Mr">Mr. <cfif degree NEQ
>> "">#degree#</cfif></cfif>#last_name#,

>>>From time to time I see, that the field title
>> isn't filled correct. Instead of "Mrs" there is "Mrss"
>> or "Mrs " with a blank at the end.
>> The cfif-statement doesn't work in this case.
>> Is there an option to use a wild-card like:
>> "Mrs*" or "Mr*" in the cfif statement ?

>> Uwe

SID> Hi Uwe,

SID> You could use <cfif find("Mrs",title)>, however, I would instead check your 
database for what you have in terms of what's been enterred into the data for title...

SID> SELECT DISTINCT title FROM mytable

SID> Then for any permutations of something other than what you would consider a valid 
title, change them to the correct permutation. Then replace the text field in your 
form with a select box or a
SID> series of radio buttons with only the viable permutations, then eliminate _all_ 
your cfif statements. ( The cfif statements for the degree field don't actually do 
anything currently -- they
SID> prevent the output of nothing if there is nothing to output, but since there's 
nothing in the variable anyway, it's the same as leaving the cfif statement out. )

SID> So your code for the email should look like this:

SID> <cfmail>
SID>   Dear #title# #degree# #last_name#
SID> </cfmail>

SID> At most this will add an extra space between the title and the last name, which 
you can eliminate by changing your sql select statement as in:

SID> SELECT title + 
SID>   CASE WHEN degree IS NOT NULL 
SID>     THEN ' ' + degree 
SID>   ELSE '' END 
SID>   + ' ' + last_name AS salutation

SID> then your cfmail tag becomes something like this: 

SID> <cfmail>
SID>   Dear #salutation#
SID> </cfmail>

SID> hth


SID> s. isaac dealey                972-490-6624

SID> new epoch                      http://www.turnkey.to

SID> lead architect, tapestry cms   http://products.turnkey.to

SID> tapestry api is opensource     http://www.turnkey.to/tapi

SID> certified advanced coldfusion 5 developer
SID> http://www.macromedia.com/v1/handlers/index.cfm?ID=21816


SID> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to