extract the visible when condition to an expression