Added functionality to portfolio sort form