Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CFML structure referenced as part of an expression error

Guest
Dec 14, 2011 Dec 14, 2011

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.

2.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Dec 14, 2011 Dec 14, 2011

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

Translate
Guide ,
Dec 14, 2011 Dec 14, 2011

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 14, 2011 Dec 14, 2011

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 14, 2011 Dec 14, 2011
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources