'Helper function to retrieve the current options for this
filter widget
@param resource: the S3Resource'

def _options(self, resource):

    query = resource.get_query()
    rfilter = resource.rfilter
    if rfilter:
        join = rfilter.get_joins()
        left = rfilter.get_joins(left=True)
    else:
        join = left = None
    rfield = S3ResourceField(resource, self.field)
    field = rfield.field
    row = current.db(query).select(field.min(), field.max(), join=join, left=left).first()
    minimum = row[field.min()]
    maximum = row[field.max()]
    return (minimum, maximum)
