How to stop applyforce?

I’m applying force using button,it works better ,How can i stop force when it reaches certain position.

for eg a basket is formed with 3 rectangles and if ball is moved in this basket ,force should be stopped or removed .can anyone help me please.