def format_field(results, field_name):
    """
    Helper function for output formatting.
    """
    value = results[field_name]
    if field_name == 'value':
        if results['operation'] == 'normal':
            return str(value)
        else:
            return ''
    if value == None:
        return ''
    elif value == True:
        return '1'
    elif value == False:
        return '0'
    else:
        return str(value)
