I am trying to do something that I thought was pretty basic but I cannot get it to work. I am calling the EntityLoad like this:
<cfscript>
transaction {
dataLoad = EntityLoad("trans");
}
</cfscript>
Now if I do it tag based I can loop through it and call the methods like this:
<cfloop array="#dataLoad#" index="x">
<cfoutput>#x.getCompanyName()#</cfoutput>
</cfloop>
But I am trying to do this in cfscript. The closest thing I can come up with is:
<cfscript>
for (x=1;x <= ArrayLen(dataLoad);x=x+1){
writeOutPut(dataLoad.companyName());
}
</cfscript>
I know that the for loop in cfscript is not the same as the cfloop array. There is not a equivalent to cfloop array in cfscript is there?
If not how can I call the methods in a EntityLoad from cfscript?
Thanks in advance for any help.
1 Answer