Thanks for the ideas and offers folks.  I checked for invisible characters.
  It got weirder because I discovered that the sort line copied and pasted
from the script into the message box worked fine.  Then, 3 other lines I
added were not just not alphabetised by the button script, they were
deleted.  I duplicated the list field, and deleted the original, duplicated
the sort button, and deleted the original.  Now everything works.

Yes I realise that if I had tested between the deletions I would have known
which object the issue was related to.  But by this stage I was berating
the objects on screen, so was not as rational as I would like to have been.
LC 10.0.0, if it's of interest.
Cheers

David G

On Mon, 23 Nov 2026 at 14:28, Craig Newman via use-livecode <
[email protected]> wrote:

> David.
>
> You are saying that the line “ FTV “ always sorts at the bottom of the
> list?
>
> Craig
>
> > On Nov 21, 2026, at 11:14 AM, Peter Bogdanoff via use-livecode <
> [email protected]> wrote:
> >
> > Also try:
> >
> > put the htmlText of char 1 of last line of field fieldName
> >
> > or
> >
> > put the htmlText of  last line of field fieldName
> >
> > There may be invisible characters or just weird ones.
> >
> > Peter
> >
> >> On Nov 21, 2026, at 9:47 AM, Alex Tweedly via use-livecode <
> [email protected]> wrote:
> >>
> >> 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
> >>> [email protected]
> >>> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> >>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >> _______________________________________________
> >> use-livecode mailing list
> >> [email protected]
> >> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > [email protected]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [email protected]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to