Many Cards Versus One Card and a List Field

Mark Smith mark at maseurope.net
Wed Jan 16 07:40:40 EST 2008


Sorry, I forgot that Rev won't allow an item of a word, so we have to  
factor the month out to another function:

This is tested on some made up data, 20,000 records

function getReport pData
    repeat for each line L in pData
       put word 4 of L & getMonth(word 5 of L) into tKey
       add word 3 of L to tTotals[tKey]
    end repeat
    return tTotals
end getReport

function getMonth pDate
    set the itemdelimiter to "/"
    return line (item 2 of pDate) of the monthnames
end getMonth

This return an array where the keys are the category/month ids in  
about 100 ms on this macintel laptop.


Best,

Mark



More information about the use-livecode mailing list