One item in list field resists alphabetising

Alex Tweedly alex at tweedly.net
Sat Nov 21 09:47:14 EST 2026


Not really "an idea" - but a (desperate?) suggestion ....

> put the text of field "myfield" into tmp
> sort lines of tmp by word 1 of each
>
and see if that does the same.

If it does, then

> repeat for each char c in line -2 to -1 of tmp
>   put chartonum(c) &CR after msg
> end repeat
>
and see if there's anything odd

Alex.

On 21/11/2026 11:26, David V Glasgow via use-livecode wrote:
> This is not a major issue, but a real niggle of a puzzle that I have wasted a hilarious amount of time trying to fix.
>
> I have a list field (several hundred lines) to which I occasionally add  items manually. Items include keywords, acronyms, words and phrases.  Some are prefixed by a space.
>
> I have a helper button which I can jab now and then that alphabetises the list ignoring any prepended space:
>
> sort lines of field  “myfield" ascending by word 1 of each
>
> This has worked flawlessly, and continues to do so, except for a single acronym I added a few days ago- ‘ FTV ‘ (single quotes not included, padded by spaces).  This sits resolutely in the post z position when other items I add obediently slot into correct places.  I have moved it up a few places and it is always replaced at the end of the list after sort.
>
> I have tried plain texting it, and typing in afresh rather than pasting from the source, to avoid invisible characters.  There are many other acronyms in the field that do as they’re told, but FTV does not.
>
> Any suggestions as to what might be going on?
>
> Cheers
>
> David G
>
> _____________
> David Glasgow
> HCPC registered Consultant Forensic & Clinical Psychologist
> Honorary Professor, Nottingham Trent University
> Centre for Crime, Offending, Prevention and Engagement (COPE)
> Carlton Glasgow Partnership
> Director, Child & Family Training, York
>
> LinkedIn <https://www.linkedin.com/in/davidvglasgow/>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


More information about the use-livecode mailing list