How to use conditions to selectively show fields, and format them