That is quite easily done with a checkbox, an if statement, and some position values. I'm replying with my phone so I don't want to give you the exact expression because I may make some mistakes but it basically works like this (in plain English).
if my checkbox equals zero then take the initial position but if my checkbox equals one then over a period of time move to position two and move back to the original position if the checkbox changes again to zero
You could tie position number one and position number two to 3-D position expression controls and use the linear or the ease function to transition between the two points. This would make it easier than editing the expression for each layer.
You could also use the original position value as the first point and set the new position using an expression controller (3-D position) or just type in the value for the front position. You could also use the composition center for the front position. Any of these methods will move a layer in a straight line from one position to another and then return it to its original position as you animate the checkbox. If you want a curved path the expression would be a lot more complicated.
You could also use a slider instead of a check box then animate the slider with a couple of keyframes so that the slider controlled the percentage of the distance between the two points.
This actually sounds like a good animation preset that I could add to my library so if I get time and no one else chimes in I may write one up.
fantastic, thanks Rick. Will give it a go and hopefully it'll save a lot of time...