Rob 7 Collins Posted July 14, 2005 Posted July 14, 2005 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.
Rob 7 Collins Posted July 14, 2005 Author Posted July 14, 2005 Nevermind, stupid user error! the operator does work with text. I wasn't using RightWords properly with my script.
Recommended Posts
This topic is 7074 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now