I am looping through a query to create a list of part numbers to populate a list of part numbers:
<cfset binlist = "" >
<cfset a = 1 />
<cfloop query="getParts">
<cfif a >
<cfset binlist = getParts.binnum>
<cfset a = 2 >
<cfelse>
<cfset binlist = binlist & "," & getParts.binnum >
</cfif>
</cfloop>
I want to add the binlist element to an element of an array in order to populate a spreadsheet:
<cfset aColumns = [ partnum, shortchar08, partdescription, binlist, inventory.currinv , staged.stagedqty, alloc.allocqty, available, shelfCount, shipdtl.shipqty, getNumberofStores.numStores, tordered, APS, paddedLeadTime, LWM, storesRemain] />
<!---add the column data to the spreadsheet--->
<cfset SpreadsheetAddRow(SpreadsheetObj, ArrayToList(aColumns)) />
1 part can be in multiple bins. It works in my CF output page, but not in the spreadsheet that I am trying to generate to show the multiple bins for a part
The spreadsheet generated only contains one bin per part and not multiple bins for the parts that do have multiple bins.