Yeah that's exactly how I'm doing it. Here's my code... very similar:
<cffunction name="StructToValueList" access="public" output="false"
returntype="string">
<cfargument name="obj" type="struct" required="yes">
<cfargument name="keys" type="string" required="no"
default="#StructKeyList(arguments.obj)#">
<!--- This function takes a structure and basically rips the keys
out of it, making it a list. --->
<cfscript>
var count = "";
var myArr = ArrayNew(1);
</cfscript>
<cfloop index="count" list="#arguments.keys#">
<cfif Len(arguments.obj[count]) gt 0>
<cfset ArrayAppend(myArr, '#arguments.obj[count]#')>
<cfelse>
<cfset ArrayAppend(myArr, 'XXX')>
</cfif>
</cfloop>
<cfreturn ArrayToList(myArr)>
</cffunction>
<cfloop index="temp.count" from="#temp.startrow#" to="#temp.endrow#">
<cfscript>
x = x + 1;
temp.cellArr[x] = StructNew();
temp.cellArr[x].id = temp2.result[temp.count].contact_id;
temp.cellArr[x].cell =
StructToValueList(obj=temp2.result[temp.count],keys="contact_id,company,first_name,last_name,title,state,industry,shrm,first_submit");
</cfscript>
</cfloop>
ret = {total=temp.totalPages, page=temp.page,
records=temp2.survey.recordcount, rows=temp.cellArr};
{"rows":[{"cell":"440,XXX,Barbara,Smith,XXX,XXX,XXX,XXX,XXX","id":440},
{"cell":"486,XXX,Beth,Jones,XXX,XXX,XXX,XXX,XXX","id":486},
{"cell":"488,XXX,Betsy,Johnson,XXX,XXX,XXX,XXX,XXX","id":488},
{"cell":"380,XXX,Bruce,Jenner,XXX,XXX,XXX,XXX,XXX","id":380},
{"cell":"370,XXX,Candy,Cane,XXX,XXX,XXX,XXX,XXX","id":370},
{"cell":"425,XXX,Carolyn,Hooper,XXX,XXX,XXX,XXX,XXX","id":425},
{"cell":"379,XXX,Miguel,Ramirez,XXX,XXX,XXX,XXX,XXX","id":379},
{"cell":"496,XXX,l,c,XXX,mi,XXX,XXX,XXX","id":496},
{"cell":"406,XXX,Jim,Cooper,XXX,XXX,XXX,XXX,XXX","id":406}],"page":
1,"records":200,"total":10}
(note: I edited out some records to save space, and changed the names
to protect the innocent). This example has "XXX" substituted for
empty values, just as a test. But note that the quotes aren't around
each value, it's around the whole string.
What am I doing wrong?? This is maddening.
Rob