I want to set a client scope variable which is a combination of text and the output from a function. No matter how I format the cfset I can't get the result I need.
I am using session management and the users are authenticated against database tables. So I use the GetAuthUser() function to get the user name.
In my application.cfc I want to prefix the username with a pathname string. But I can't seem to get the syntax correct. I always end up with only the string. I start and stop the Coldfusion sever to make sure the client scope is cleared but it makes no difference.
I would prefer to use cfset for this and not cfscript.
This is the function in my application.cfc:
<cffunction name="OnSessionStart" >
<cfset client.customerpath="C:\Dropbox\CustomerArea\" & #GetAuthUser()#>
</cffunction>
A cfdump shows only C:\Dropbox\CustomerArea\
The GetAuthUser() on it's own works fine. I just can't seem to prefix it.
#getAuthUser()#or do a direct string likeC:\Dropbox\CustomerArea\#getAuthUser()#? - Shawn