Re: sorting question
You could try sort items of field myField” by char 2 to 3 of each text ascending but you would have to add a space before the first item. Bob S On Sep 24, 2014, at 01:19 , la...@significantplanet.orgmailto:la...@significantplanet.org wrote: sort items of field myField text ascending ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: sorting question
Even better. DOH! Bob S On Sep 26, 2014, at 01:30 , Kay C Lan lan.kc.macm...@gmail.commailto:lan.kc.macm...@gmail.com wrote: sort items of tStore by word 1 of each ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: re: sorting question
On Wed, Sep 24, 2014 at 4:40 PM, Dave Kilroy d...@applicationinsight.com wrote: For others wondering what the cause was, it was likely that the spaces in each item were confusing things It is impossible that the spaces in front of each item could cause the sort NOT to change the list at all, which is what Larry reported. In the message box: put ID, NA, OD, OA, FE into tStore sort items of tStore put tStore into msg The space character is just another character and LC will sort it correctly. Of the list given, only the first item may not have had a space in front of it, so this may have ended up in the wrong place but the rest should have sorted correctly. Whilst removing and replacing spaces is one option to correct this, it may not be suitable in every situation, especially if the existence or lack of a space has significance - i.e. if you have a list of file names and you are specifically looking for those names that have a space as a prefix or a suffix. put ID, NA , OD,OA, FE into tStore sort items of tStore put tStore into msg Will correctly sort the file names placing all those with a prefix space at the beginning and preserving all suffix spaces. If prefix and suffix spaces are irrelevant then you can save yourself the hassle of standardising your data by removing and replacing the spaces by simply specifying that you want to sort by word: put ID, NA , OD,OA, FE into tStore sort items of tStore by word 1 of each put tStore into msg ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
re: sorting question
Sorry, never mind! Larry ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: re: sorting question
Sounds like you've sorted it Larry :) For others wondering what the cause was, it was likely that the spaces in each item were confusing things - so if they are removed prior to the sort it all works fine (they can be put back in after...) on mouseUp replace space with empty in fld fldTest sort items of fld fldTest replace comma with , in fld fldTest end mouseUp - Some are born coders, some achieve coding, and some have coding thrust upon them. - William Shakespeare Hugh Senior -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/sorting-question-tp4683684p4683687.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode