<cfset session.client_name = "
     #GNC.Client_First_name#&nbsp;
     #GNC.Client_Middle_Name#&nbsp;
     #GNC.Client_Last_Name#
     ,&nbsp;#GNC.Client_Name_Suffix" />

<!--- Remove the last comma and nbsp if it's the last thing on the line --->
<cfset session.client_name =
rereplace(trim(session.client_name),",&nbsp;$","","ALL")/>



On 8/25/06, Rick Faircloth <[EMAIL PROTECTED]> wrote:
> My goal is to get rid of the comma after the Client_Last_Name, unless
> there is a Client_Name_Suffix.
>
> <CFSET Session.Client_Name =
>
> '#Get_New_Client.Client_First_Name#&nbsp;
> #Get_New_Client.Client_Middle_Name#&nbsp;
> #Get_New_Client.Client_Last_Name#
>
> <CFIF Len(Trim(Get_New_Client.Client_Name_Suffix))>
>
> ,&nbsp;#Get_New_Client.Client_Name_Suffix#
>
> </CFIF>
>
> '>
>
> This is all one line with no spaces, but I separated the parts
> to make it easier to read.what am I doing wrong?
>
> Can I use the CFIF in the middle of the CFSET like that or should I do this:
>
> <CFSET Session.Client_Name=
>
> '#Get_New_Client.Client_First_Name#&nbsp;
> #Get_New_Client.Client_Middle_Name#&nbsp;
> #Get_New_Client.Client_Last_Name#'
>
> </CFSET>
>
> <CFIF Len(Trim(Get_New_Client.Client_Name_Suffix))>
>
> <CFSET Session.Client_Name='#Session.Client_Name#,&nbsp;
> #Get_New_Client.Client_Name_Suffix#'>
>
> Rick
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251113
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to