This seems a little odd. If you return data from a CFC into variables scope, it creates
a second struct "variables" within CFMX VARIABLES Scope unless you use structAppend..

<cffunction name=getUser.....
var user = structNew();
user['firstName'] = "fn";
user['lastName] = "ln";
user['age'] = "100";
<cfReturn user/>

Calling Code
<cfscript>
user = createObject(....)
variables = user.getUser()

The above creates VARIABLES.variables.firstName instead of  "VARIABLES.firstName"

The only way i found around this is

structAppend(variables, user.getUser()); // but then this changes all the variables to UPPER Case.

Is there any other way around this?

Thanks,
Joe Eugene
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to