I can't seem to be able to assign values dynamically.
I'm going through a csv file line by line, here's what it looks like:
#include \\Cwidomain\Accounting\GENERAL\Scripts\lib\CSV.ahk
CSV_Load("open.csv", open_report, ",")
Loop % CSV_TotalRows(open_report) {
i++
work_order := CSV_ReadCell(open_report, i, 2)
if work_order is not number
continue
account_code := CSV_ReadCell(open_report, i, 3)
store_number := CSV_ReadCell(open_report, i, 4)
service_description := CSV_ReadCell(open_report, i, 6)
service_date := CSV_ReadCell(open_report, i, 7)
crew_code := CSV_ReadCell(open_report, i, 9)
crew_email := CSV_ReadCell(open_report, i, 45)
store_address := CSV_ReadCell(open_report, i, 21)
store_city := CSV_ReadCell(open_report, i, 22)
store_state := CSV_ReadCell(open_report, i, 23)
store_zip := CSV_ReadCell(open_report, i, 24)
job_data := work_order ", " account_code ", " store_number ", " service_date ", " service_description
db := {crew_code:[job_data]}
}
For crew, jobs in db
For each, work_order in jobs
MsgBox %crew%`t%work_order%
ExitAppcrew_code is treated as a literal for some reason. Also how do I push multiple work orders into the array dynamically? Right now it just stores one.