def get_clean_vals(rec, flds):
    """Returns a list of the values in the 'rec' record from an Energy Library table.
    'rec' is a dictionary, with field names being the keys.  'flds' are the complete
    list of fields for the table, in the order that the values should be returned in.
    If one of the fields in 'flds' is not present in the record, a None is returned.
    Some value substitions are made (see code), such as substituting the Python constant
    True for the string 'true'.
    """
    final = []
    for f in flds:
        v = rec.get(f, None)
        if v == 'false': v = False
        if v == 'true': v = True
        final.append(v)
    return final