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.
Simplest to set up would be to put two copies of your portal inside a tab control with two tab panels. One copy can sort by last name and one by department. Then, instead of clicking a button, you click the tab label to see your portal sorted in the desired order. This tab control can be nested inside another tab control if that is necessary.