How to apply conditions to Survey