Complex sentence: When the outcome at Trangen was clear, and thus the main Swedish troops were captured, Staffeldt sent troops towards Midtskogen in Sweden, where the remaining Swedish troops, a detachment led by Major Söderhjelm, were captured.
Split into simpler sentences: When the outcome of the battle at Trangen was clear, Staffeldt sent troops towards Midtskogen in Sweden. There the remaining Swedish troops, a detachment led by Major Söderhjelm, were captured.