def sort_records(recordset, sort_key):
    """sort a list of dictionary using the values from a common key

    Arguments:
        recordset {[list]} -- list of dictionaries
        sort_key {[str]} -- dictionary key on which data will be sorted

    Returns:
        [type] -- [description]
    """
    #logging.info(recordset)


    checked = [i for i in recordset if i[sort_key]]
    if checked:
        return sorted(checked, key=lambda k: k[sort_key])
    else:
        return recordset