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

Element undefined in structure error

Guest
Dec 14, 2011 Dec 14, 2011

Receiving an error when I run code that says "Element Assessment is undefined in a CFML structure referenced as part of an expression".  I cannot paste code in the editor for some reason.  Please click http://pastebin.com/2A059LEE to go to source code.  Please click http://pastebin.com/31a2qEYS to go to error page.  Any assistance would be greatly appreciated. 

1.2K
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

Guide , Dec 14, 2011 Dec 14, 2011

In fact no, it's simpler than that. On line 53, you set the value in a struct called "structJobType". On line 79, you're referencing a struct called "structJobStatus". Completely different struct.

Translate
Guide ,
Dec 14, 2011 Dec 14, 2011

Seems pretty clear to me, you've tried to reference the Assessment variable which hasn't been set yet.

I'd guess it's at line 79:

     <cfelseif arguments.type eq structJobStatus["ASSESSMENT"]>

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

Thanks. Correct me if I'm wrong, but is the variable not set on line 53?

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
Guide ,
Dec 14, 2011 Dec 14, 2011

Only if that value exists in the "data2" query.

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

When I do a cfdump the value is in the resultset. Please view the following link: http://pastebin.com/NiDPJ23g.

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
Guide ,
Dec 14, 2011 Dec 14, 2011

In fact no, it's simpler than that. On line 53, you set the value in a struct called "structJobType". On line 79, you're referencing a struct called "structJobStatus". Completely different struct.

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

Great catch. Thank you.

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