format_label function

Format field label based on output format