Simone
05/31/2023, 3:10 PMzackster
05/31/2023, 3:25 PMAdam Cameron
Adam Cameron
<cfset "#form['hours']#" = 4>
is setting a variable called [whatever the value of form.hours
is] to be 4
form["hours" & rownum]
is referencing form.hours5
, which you don't mention anywhere else in the code.
Also - same as my perennial advice - if you give us code, make it self contained. We have no idea what's in the form scope, so - again - pretty hard to infer what yer doing.Adam Cameron
Adam Cameron
zackster
05/31/2023, 4:17 PMAdam Cameron
Adam Cameron
Myka Forrest
05/31/2023, 5:41 PMThe value 4,5 cannot be converted to a number.
is not the same error that occurs in your trycf example. My gut says the code that's generating this error is coming from two form fields with the same name with values 4 and 5. Form field values with the same name get concatenated into a list with those values.zackster
05/31/2023, 5:49 PMAdam Cameron