How to make display depends on two fields

i have a button i want to display it based on two fields

eval: doc.field1 && doc.field2