Sorry for late reply, I went out of town on Friday.
Anyway, You would need to setup a trigger to toggle logic flow for the Onclick event.
Note that After the move is completed I reset/clear the set variables.