Goals and Unattachment

You say that we should concentrate on our present actions and not get emotionally attached to the result. Then how should we plan our future? When we set our goals, we’re generally expecting things to turn out it a certain manner. Isn’t it how we plan our lives? How do we detach ourselves from the outcome and yet find the strength and motivation to take action towards our goal?