I am trying to write this query that has some conditional logic. I urgently need a solution if anyone is around.
I get the error (below) when trying to do this:
You have attempted to dereference a scalar variable of type class java.lang.String as a structure with members.
My code snippet from the actual query is as follows:
<cfif StructFindValue(#currentStructure.List#, "ABC")>,Some_Code, Some_Amount</cfif>
and then in the VALUES part of the query I have:
( <cfif StructFindValue(#currentStructure.List#, "ABC")>,'XL',40</cfif>
I am trying to find the value "ABC" in the structure and if so, then add the columns Some_Code and Some_Amount with values of 'XL' and '40'
Can someone PLEASE tell me where I am going wrong? Should I use StructFind? or StructFindValue?