You are defining a ONE dimensional array
<cfset myArr = ArrayNew(1)>
But trying to use a TWO dimensional array...
<cfset myArr[currentrow][1]= OpUnit>
I suggest using a structure and array, its a lot clearer to refer to a variable as OpUnit than it is as "1" ...
It would look like this.. I think it's easier...
<cfset myArr[currentrow] = structNew()>
<cfset myArr[currentrow].OpUnit = OpUnit>
<cfset myArr[currentrow].Employee
Regarding checking the JobCode....
<cfloop query="qry_getDescription"
<cfset VPofOps="8074,60851">
<cfif listFind( VPofOps, qry_getDescription.JobCode
.... YES, it's on the list....
<cfelse>
... NO, job code is NOT on the list
</cfif>
Main Topics
Browse All Topics





by: _agx_Posted on 2009-05-13 at 14:57:19ID: 24380106
Which field relates to VPofOps, lEmployeeid or lJobCode?
I do not see any insert code. Can you explain what you need there? Does it insert have to be done using the arrays, or can you just do a separate query:
<cfquery name="addTable" datasource="xxxx">
INSERT INTO SomeTable (....)
SELECT Columns
FROM OrgUnitLocation
WHERE OpUnit='50029'
AND lEmployeeid IN ( 8074,60851 )
</cfquery>