def min( dbid, fieldNames, query = nil, qid = nil, qname = nil, clist = nil, slist = nil, fmt = "structured", options = nil )
      min = {}
      hasValues = false
      iterateRecords(dbid,fieldNames,query,qid,qname,clist,slist,fmt,options){|record|
         fieldNames.each{|field|
            value = record[field]
            if value
               baseFieldType = lookupBaseFieldTypeByName(field)
               case baseFieldType
                  when "int32","int64","bool" 
                     value = record[field].to_i
                  when "float"   
                     value = record[field].to_f
               end
            end
            if min[field].nil? or  (value and value < min[field])
               min[field] = value
               hasValues = true
            end
         }
      }
      min = nil if not hasValues
      min
   end
def min( dbid, fieldNames, query = nil, qid = nil, qname = nil, clist = nil, slist = nil, fmt = "structured", options = nil )
      min = {}
      hasValues = false
      iterateRecords(dbid,fieldNames,query,qid,qname,clist,slist,fmt,options){|record|
         fieldNames.each{|field|
            value = record[field]
            if value
               baseFieldType = lookupBaseFieldTypeByName(field)
               case baseFieldType
                  when "int32","int64","bool" 
                     value = record[field].to_i
                  when "float"   
                     value = record[field].to_f
               end
            end
            if min[field].nil? or  (value and value < min[field])
               min[field] = value
               hasValues = true
            end
         }
      }
      min = nil if not hasValues
      min
   end
Find the lowest value for one or more fields in the records returned by a query.
 e.g. minimumsHash = min("dfdfafff",["Date Sent","Quantity","Part Name"])