gephry Posted March 28, 2005 Posted March 28, 2005 After I have the script perform a Find, I need to sort all the found records in an order that varies 4 different ways. Each record is in a specific category (1-4) and has it's own rating (1-5). Depending on the category number, I need it to sort records by rating, but in different orders. Example: Category 1 = Sort 1, 2, 3, 4, 5; Category 4 = Sort 5, 3, 1, 2, 4. I've tried creating a value list from a field in which I enter the order I want (to use as custom sort order), but the value list just puts the numbers from the field in numerical order. Is there any way to do this? And if not in FMP6, could I do it in 7?
comment Posted March 28, 2005 Posted March 28, 2005 Create a calculation field along the lines of: Case ( Category = 4, Position ( "53124" , Rating , 1 , 1 ), Rating ) Sort on this field instead of Rating.
gephry Posted March 29, 2005 Author Posted March 29, 2005 Whoa. Yea. That'll do, that'll do. Took me a bit to figure that one out, but it makes complete sense. I had a lot of variables that had to go into the sort, so I incorporated it into the calculation. It got to be a big formula, but there's nothing wrong with that at all. It did the trick just fine. Thanks so much!
Recommended Posts
This topic is 7180 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