jwdcfdeveloper
Programmer
I have created a cfc that passes back a structure. My problem is getting the structSort function to pass back all of the values here is the code that I have to create the sort
<!--- now create an array and sort the values --->
<cfset arrOrderedEvents = structSort(stcEvents,"numeric","asc","eventId")>
<!--- create new struct --->
<cfset thisEvent= structNew()>
<!--- loop over the array and order the structure --->
<cfloop from="1" to="#arrayLen(arrOrderedEvents)#" index="i">
<cfset thisEvent = stcEvents[arrOrderedEvents]>
</cfloop>
<cfreturn thisEvent>
However, the thisEvent structure only returns one row of data and should return 6 rows, any ideas about why this is occurring?
Thanks,
JW
<!--- now create an array and sort the values --->
<cfset arrOrderedEvents = structSort(stcEvents,"numeric","asc","eventId")>
<!--- create new struct --->
<cfset thisEvent= structNew()>
<!--- loop over the array and order the structure --->
<cfloop from="1" to="#arrayLen(arrOrderedEvents)#" index="i">
<cfset thisEvent = stcEvents[arrOrderedEvents]>
</cfloop>
<cfreturn thisEvent>
However, the thisEvent structure only returns one row of data and should return 6 rows, any ideas about why this is occurring?
Thanks,
JW