This can get very complicated, depending on how you expect it to work. Since an expression only has access to the pre-expression value of the property it’s applied to, the expression will not have access to the displacement value calculated on the previous frame. So it would probably end up working like this: as the null approaches the layer, the layer moves away from the null on the line drawn from the null to the layer’s original position. As soon as the null crosses the layer’s original position, the layer will snap to the maximum deflection in the opposite direction. Probably not what you have in mind. If the null never crosses the layer’s original position, then it’s not a problem. If it does, however, the only solution is to build an expression that recreates everything that’s happened from the first frame up to the current time. Not simple, but do-able.
Dan