What does "find" have to do with sort?
Can you confirm that these are records displayed in a portal?
Please ignore the text that reads 'find' and 'find all'. I mean the headers beneath, such as, "company, equiry number" etc.. So if user clicks on, for example, 'company' then i would like the brown box behind the compsny text to go s little dsrker, and the records below to sort in aphabetical order, A to Z. if clicked again then I would like the reocrds to sort in Z to A... I hope that is clear...?
Sorry - i didnt answer your questions. Not a portal. just a standard list view...not using a find script
Then you do not have a tab control here, just buttons that look like tabs? That's what led me to ask about a portal here as a list view of your data isn't really compatible with tab controls.
Assuming that this is a list view of the data where you have one record for each row of data....
You can turn each colomn heading into a button to perfrom a script.
Each script can have two steps:
Set Variable [$$SortOrder ; "Company"]
Sort Records [Restore ; no dialog] //specify a sort order that sorts on Company.
Then you can use a conditional format expression on the layout text that's your column label for Company as:
$$SortOrder = "Company"
To specify a change in text color, fill color or both.