variables undefined in URL

Hi there

Am having a few issues and wondering if anyone can assist

I am building a query in an event handler, which grabs data from the
last fm api..

rc.qryTopTracks =

I am looping this query in my view to output data. However I want to
test if one of variables from this query is defined or not, but the
coldbox functions dont seem to be allowing me to do so..

<cfoutput query="rc.qryTopTracks">
            DO THIS......

Can anyone assist?

Many thanks

This should work:

if ( StructKeyExists( rc.qryTopTracks.columnlist, “url” ) )
// do something

Thanks for your response

Tried it, I get following error message

You have attempted to dereference a scalar variable of type class
java.lang.String as a structure with members.

I have tried the paramvalue in the handler previously, to no avail..


I presume

<cfset myVar = event.getValue( 'qrtTopTracks' , '')>

should be

<cfset myVar = event.setValue( 'qryTopTracks' , '')>


If so, that doesnt seem to function either


I think John's suggestion should of been this:

if ( listFindNoCase ( rc.qryTopTracks.columnlist, "url" ) )
  // do something


Ah yes, that’s exactly what I meant - thanks Brett and sorry namtax.

Yes, that has worked, thanks very much...i didnt realist there was a
columnlist function, that will come in handy