You can't sort a portal by script except if you use it to change a field value in one form of a "sorting portal" trick that doesn't seem to apply here.
You can, get your records to sort by part name I think, but it takes an extra field. Try this method and see if it works for you:
Define a calculation field in AssemblyPart. enter Part::Name as the sole item in its calculation and set it to return text as it's return type.
Open portal setup... and specify this new calculation field as the field on which to sort items in the portal.
That seems a good solution for this problem, I will try it...