def getCriteriaForQuery( id, name )
      criteriaForQuery = nil
      if id
         query = lookupQuery( id )
      elsif name
         query = lookupQueryByName( name )
      end
      if query and query.elements["qycrit"]
         criteriaForQuery = query.elements["qycrit"].text.dup
      end
      criteriaForQuery
   end
def getCriteriaForQuery( id, name )
      criteriaForQuery = nil
      if id
         query = lookupQuery( id )
      elsif name
         query = lookupQueryByName( name )
      end
      if query and query.elements["qycrit"]
         criteriaForQuery = query.elements["qycrit"].text.dup
      end
      criteriaForQuery
   end
Returns the criteria associated with a query.