Anders Posted July 23, 2001 Posted July 23, 2001 Help! How do I sort a hit list with my predefined "Value list" (or what the english term may be). I need to do it with a link. Have tried this link, but it wont work properly. It doesn't sort the title <a ref=" http://193.10.179.106/lankar/FMPro?-db=lank.fp3&-format=search_results.htm&-error=search_results.htm&-lay=Layout%201&Filering1_1=P&Filering2=2&-max=10&-sortfield=Filering1&-SortOrd er=custom=lank&-sortfield=Titel2&-SortOrder=ascend&-Find ">Whatever</a> The list must be sorted according to two parameters: 1. Classification, by my predefined rules. (Eg A(x) must! come before A etc) 2. Title, ascending (Aardwark before Adress, Beatles, Cyprus etc.) TIA Anders
Partha Posted July 23, 2001 Posted July 23, 2001 Hi, In CDML, sorts can be either Ascending (default) or descending. If you require a custom sort, wud suggest you create a calculation field (obviously indexed) that rates itself with a 1 or a 2, etc based on the priority that you've set and sort by this calc field. The calc will be rather long with nested IF or CASE statements, but I don't see any other way out. Wud also suggest that you take the space out of the layout name (Layout 1) as spaces have caused me some rather illogical problems which I've spent hours troubleshooting only to find out it was something so simple I'd overlooked. Rgds, Partha
Anders Posted July 23, 2001 Author Posted July 23, 2001 Hi Thanks. I feel silly. A simple mispell of one of my field names cost me half a days work. Title2 and Titel2 looks very similar inside such a compact mass of text. I will consider your suggestion concerning the layout name. Actually there are three sorting parameters: Ascend (default), Descend, and Custom. When using Custom you can use predefined Value lists, I think that is the proper english term. (I use a swedish version of FM myself.) This part of the code: -sortfield=Filering1&-SortOrder=custom=lank&-sortfield=Title2&-SortOrder=ascend sorts my hitlist exactly as I mentioned above. Cheers Anders
Recommended Posts
This topic is 8792 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