<cfset a = loc.address & IIf(Len(loc.city), DE(", #loc.city#") , DE(""))>

On 1/9/06, Jim McAtee <[EMAIL PROTECTED]> wrote:
> I always run into this, and I've probably come across a solution, but
> forgotten it.  In an IIf() I can easily return the value of a varible by
> surrounding it in quotes, or return a literal by using DE(), but how to
> use both?  What would be the correct syntax to use in the first argument
> to IIf() in the following example:
>
> <cfset a = loc.address & IIf(Len(loc.city), DE(", ") & loc.city, DE(""))>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228948
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to