Copy link to clipboard
Copied
I'm getting an error where the message says "Element ON HOLD-GENERAL is undefined in a CFML structure referenced as part of an expression". I have had this error in the past where helpful poster pointed the problem. I looked for the same issue here but do not see the probelm. Please view source code here: http://pastebin.com/2A059LEE. Output is located here: http://pastebin.com/31a2qEYS. "On-Hold General" is what I have in my database.
This error is always going to be caused by the same thing: structJobStatus["ON HOLD-GENERAL"] doesn't exist. There's no point in asking "what causes this" more than once, because the answer will always be the same, and the solution to working out why is always going to be the same.
Dump structJobStatus before the error, and look at what's in it. You will observe it does not have in it what you think it does. Work backwards through your logic to determine why that is.
--
Adam
Copy link to clipboard
Copied
Deja-vu?
Turn on proper debug logging and it'll tell you exactly what line it's on. Just before trying to reference the variable, do a cfdump of the struct then a cfabort to see if what's in it is what you think it is.
Which it clearly isn't.
Copy link to clipboard
Copied
This error is always going to be caused by the same thing: structJobStatus["ON HOLD-GENERAL"] doesn't exist. There's no point in asking "what causes this" more than once, because the answer will always be the same, and the solution to working out why is always going to be the same.
Dump structJobStatus before the error, and look at what's in it. You will observe it does not have in it what you think it does. Work backwards through your logic to determine why that is.
--
Adam
Copy link to clipboard
Copied
I see the problem. Thank you. I'm also trying to display the date in the last updated column but its outputting "40761.6458333" for some reason.