July 14, 200520 yr I need to sort a table's records, and number them based on the sort. But the user needs to be able to arbitrarily change the sort as well. I have a field for the sorting before a user changes things, called calc.Sort, and a field for the sort numbers called actual.Sort. When records are added to this list, they are not given an actual.Sort number. So, if I have a record set like: RecordNumber actual calc 1 def 2 1 abc 3 2 ghi I want my function to change it to this: RecordNumber actual calc 1 1 abc 2 2 def 3 3 ghi I've got a good script, that would work but for one critical error... I make a comparison like "thisRecord::calc.Sort > recordToSort::calc.Sort". The comparison operators in FM7 are not overloaded for text, so I get this result: RecordNumber actual calc 1 1 abc 2 2 ghi 3 3 def Is there any way to do an alphabetical comparison in script? Otherwise, I have to create a temporary table to store the calc.Sort values and effect the comparison by RecordNumber.
July 14, 200520 yr Author Nevermind, stupid user error! the operator does work with text. I wasn't using RightWords properly with my script.
Create an account or sign in to comment