Use then_if in events filtering