Sort Portal via Preform Script Button Push
I have a db file called Companies and another file called Contacts. I have a portal inside the Company file that accesses all the contacts that work for that company. They are of course displayed inside the portal as line items.
I want to have two buttons on the Company layout that holds the portal, outside the portal, that when pushed will sort the layout by last name and then another button that would sort the portal by Department. Both Last Name and Department fields are part of the Contacts file.
I cannot seem to figure out how you create a script that I can perform with a button push that will sort the portal displayed contact names. Can someone help.