Greg Hains Posted April 26, 2007 Posted April 26, 2007 Hi, I see no reference to being able to sort a custom value list in this forum nor can find it in my "bible". I have a Custom Value List that users can update a client list in. I cannot see where (if at all possible) somewhere to sort this custom value list. It may be custom for a reason (hence no sorting) but as users will invariably muck up the alphabetical order I need a way to sort it - even empty it of blank entries. They like the Edit... function at the end of the list so the Custom seemed like a good idea. If I cant sort such a list, can anybody give me a better way to have this list auto sort, but still the ability to update it with the Edit... tool? I have being trying to avoid using another database file, and using a table from the same file as it gives me an unrelated table error on the layout. Any help appreciated. Cheers, Greg
Søren Dyhr Posted April 26, 2007 Posted April 26, 2007 I have being trying to avoid using another database file, and using a table from the same file as it gives me an unrelated table error on the layout. Couldn't be an another table in the same file, or perhaps even a self join?? You mix table with file or... I would say that an ordinary textfield a relation away based on UserId as key could make the user tailor his/her sortorder scripted or not! --sd
Greg Hains Posted April 26, 2007 Author Posted April 26, 2007 Hi Soren. Thankyou for your reply, but Im afraid I dont understand. Are you saying that the list could come from another table and make that table presorted?... or something? Greg
Søren Dyhr Posted April 26, 2007 Posted April 26, 2007 What you wish is that a user can make a personalized sortorder, by putting some values in a related text field that occures as identifiers for some sorting. This could the value list be based on that single records values which singled out by the relation, by establishing the dynamic value list to the field. When a cartesian relation doesn't work is because each user changes data in the same record. The field can't be global due to the lack of indexing posible, so a straight forward text field a relation away via Get(CurrentUserName) or similar, to make the personalization happen. But I have a hunch that, what you ask for is something else. What you perhaps mean is that a user builds his her own list of customers, but the sorting of these IN THE POPUP is leaving something to be desired. If thats the case, should you perhaps ditch the popup as such and make portal with the top10 contacts for each user, each portal row should then be a clickable, but to include the persons in the portal could a (jikes) global field store the ID's of those to show in the portal, and the portal can be sorted either in the relations def, or in the layout of the portal. --sd
Greg Hains Posted April 26, 2007 Author Posted April 26, 2007 Yes - as per your third paragraph that is what Im asking - how do I alpha sort a Custom Value list when it pops up. Greg
Søren Dyhr Posted April 26, 2007 Posted April 26, 2007 Well it's sort of related to the previous mentioned, but what forgot, is that everything related gets sorted anyway... here's a way to accomplish it! --sd Untitled.zip
Greg Hains Posted April 26, 2007 Author Posted April 26, 2007 Hi Soren. Thanks for that - I see what youve done, and can achieve that bit, but its the Edit... function at the end of the list they want. Currently I just have another table sorted for that list but no Edit... function either. Any way of adding Edit... to the end of the example you send me? Thanks in advance. Greg
Ender Posted April 26, 2007 Posted April 26, 2007 There is no built-in functionality to sort a custom value list. The best method is to define a value list based on a field. You then just need to build an interface for editing entries in that table.
Søren Dyhr Posted April 26, 2007 Posted April 26, 2007 Any way of adding Edit... to the end of the example you send me? Ender is saying what it is... you edit the list in my template by jumping to the related record, and then ignore the order, since it's corrected when you wish to use it, the next time you jump to the edit layout, is the sorted list you see, even though you left it unsorted, hence the use of ValueListItems( in the script. It does more to the housekeeping than that, if you have several occurences of the same item in the list, is it removed, next time you wish to edit. --sd
Recommended Posts
This topic is 6422 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