[hc] sort stack script help
(Msg 1 of 7)
drjohntas <drjohntas@[redacted].com>
Saturday, 07-Jul-2018 05:41 GMT
Hi.. I am doing my end of year accounts. I have a Hypercard Invoice stack with various sort buttons.. eg "sort by client name" (brings same clients invoices together), or "sort by company" etc
I want to bring stack back to original order so wrote a "sort by invoice number"
Each invoice is on a separate card.
Each card has a bg field called "invoice number"
this field has a number .. first card was 1, second 2, one hundreth 100, and so on up to the thousands eg 2347
I wrote a simple script "sort stack by bg field "invoice number"
I am getting a result where, for example, invoices 1,10,100 follow each other when the script has run.
or 979,99,980 follow each other
Whereas I want the stack ordered by usual numeric sequence eg 1,2,3 ..... 979,980,981.....
I am sure there is a simple answer and would be grateful for help.
[hc] sort stack script help
(Msg 2 of 7)
drjohntas <drjohntas@[redacted].com>
Saturday, 07-Jul-2018 05:41 GMT
Hi.. I am doing my end of year accounts. I have a Hypercard Invoice stack with various sort buttons.. eg "sort by client name" (brings same clients invoices together), or "sort by company" etc
I want to bring stack back to original order so wrote a "sort by invoice number"
Each invoice is on a separate card.
Each card has a bg field called "invoice number"
this field has a number .. first card was 1, second 2, one hundreth 100, and so on up to the thousands eg 2347
I wrote a simple script "sort stack by bg field "invoice number"
I am getting a result where, for example, invoices 1,10,100 follow each other when the script has run.
or 979,99,980 follow each other
Whereas I want the stack ordered by usual numeric sequence eg 1,2,3 ..... 979,980,981.....
I am sure there is a simple answer and would be grateful for help.
[hc] sort stack script help
(Msg 3 of 7)
paul.foraker <paul.foraker@[redacted].com>
Saturday, 07-Jul-2018 06:06 GMT
sort stack numeric by bg fld "invoice number" -- should do the trick
On Fri, Jul 6, 2018 at 10:41 PM, drjohntas@[redacted].com[HyperCard] <
HyperCard-Mailing-List> wrote:
>
>
> Hi.. I am doing my end of year accounts. I have a Hypercard Invoice stack
> with various sort buttons.. eg "sort by client name" (brings same clients
> invoices together), or "sort by company" etc
>
> I want to bring stack back to original order so wrote a "sort by invoice
> number"
>
> Each invoice is on a separate card.
>
> Each card has a bg field called "invoice number"
>
> this field has a number .. first card was 1, second 2, one hundreth 100,
> and so on up to the thousands eg 2347
>
> I wrote a simple script "sort stack by bg field "invoice number"
>
> I am getting a result where, for example, invoices 1,10,100 follow each
> other when the script has run.
>
> or 979,99,980 follow each other
>
> Whereas I want the stack ordered by usual numeric sequence eg 1,2,3 .....
> 979,980,981.....
>
> I am sure there is a simple answer and would be grateful for help.
>
>
>
>
[hc] sort stack script help
(Msg 4 of 7)
drjohntas <drjohntas@[redacted].com>
Saturday, 07-Jul-2018 06:43 GMT
thanks .. silly me.. I stuck the word numeric in the wrong spot Can you help me do it in the reverse order so highest number first
[hc] sort stack script help
(Msg 5 of 7)
paul.foraker <paul.foraker@[redacted].com>
Saturday, 07-Jul-2018 06:53 GMT
-- probably; have not tried it
sort numeric descending by fld "invoice number"
On Fri, Jul 6, 2018 at 11:43 PM, drjohntas@[redacted].com[HyperCard] <
HyperCard-Mailing-List> wrote:
>
>
> thanks .. silly me.. I stuck the word numeric in the wrong spot
> Can you help me do it in the reverse order so highest number first
>
>
>
>
[hc] sort stack script help
(Msg 6 of 7)
drjohntas <drjohntas@[redacted].com>
Saturday, 07-Jul-2018 06:57 GMT
great.. that does it... thanks heaps
HyperCard® and HyperTalk™ remain trademarks of Apple, Inc.; other trademarked products and terms mentioned in this archive are the property of their respective trademark holders. Individual messages remain the intellectual property of their respective authors.