How to set up condition between three fields...