title: Using StructKeyExists in place of IsDefined
body: <p>For code enhancement purposes, we are going to convert all <code>isDefined()</code> calls to <code>structKeyExists()</code>. A couple of things that I need to know are: </p>
  
  <p>How do we define a query in <code>structKeyExists()</code>? For instance: </p>
  
  <pre><code>&lt;cfquery name="getname" datasource="dsn"&gt;select * from table&lt;/cfquery&gt;
  
  &lt;cfif isDefined('getname') and getname.recordcount neq ""&gt;Do this&lt;/cfif&gt;
  </code></pre>
  
  <p>Since there is no scope defined for <code>isDefined()</code>, what scope should we use for <code>structkeyExists()</code>?</p>