Is there a way to increment a number field based on conditional logic?