Generated desing Report and sorting

Is it possible to use sysQueryForm sorting parameters on a Purchase Order?

I tried to enable this sorting function and I used this code in a execute section:


but in fetch there is tradeloopTrans, is this causing some problems with this function that I want to deploy?

Summa: End user want´s to use sorting case by case. Sometimes using ItemId and in other case externalId.

Here´s a picture of sorting functions I meant.