I want the table to sort so, for example all the lines with Builders in (item 7) are at the top of the displayed table.
According to the Dictionary, sort container is the way to do this. however it is not clear how it is implemented, because all combinations I have tried do not work. I show below the code that sorts the text, but without the part I cannot get right. The part I need help with.
Code: Select all
on scrollbarBeginning
set the itemDelimiter to tab
sort lines of field "table 1" ascending text by item 7 of each
end scrollbarBeginning
on scrollbarEnd -- use a scroll bar to navigate among cards
set the itemDelimiter to tab
sort lines of field "table 1" descending text by item 7 of each
end scrollbarEnd
There is another oddity as well, and if I had hair, I would have pulled it all out by now.
Each column in the table has scrollbar arrows as sort controls. Just the arrows, not the bit between as well. This works well as Shift Click on the arrow head and is neat, also.
Column 5 and 6 both contain dates, col 6 works, but col 5 does not. the only difference between them is the number 5 for item 5 and 6 for item 6. the code was duplicated with the scroll control and renamed. The item numbers have been changed of course.
If I change the 5's to 6's, column 6 sorts, so the code is working. however, if I change the code in col 6 to 5's then Col 5 still refuses to work.
I have made sure the dates in col 5 only contain properly formatted dates, only.
So, why will column 5 not work?
Your help on both would be appreciated.