trouble with repeat with i from 1 to count of

Thanks for your thought Nigel, I do realize that if we start with a list,then that is what we have to address.But you are right, I had something else in mind. I will have a rummage and see if I can find the reference. It was an obscure point I seem to recall, and I do recall trying it out on using Database Events. I will circle back later.

Further to my note regarding the speed of list recursions and my recollection of the more efficient, in some cases, uses of records, I was correct in my hunch that it was related to the use of Database events (built in to every Mac). See Soghoian & Cheeseman, page 700 on The use of records and DB events. The speed gain, they assert occurs through the ability to use the ‘get all … Whose…’ clause because “it is the target application Database Events that is evaluating these statements, and it is very fast.”
But this is almost certainly a subject for discussion in a separate post.

But in any case, here is a great link with full working example.
https://iworkautomation.com/numbers/sqlite.html

Hi
Thanks,will use your compression Nigel
bills

Hi Tim.

As I suspected when I saw your previous post mentioning Database Events and ‘whose’ filters, the kind of ‘record’ you’re thinking of is a class of object belonging to the Database Events application, not the ‘record’ belonging to the core AppleScript language. Both are “AppleScript” in the broader sense; but one is a term defined in Database Events’s scripting dictionary (corresponding to a record in a database) and the other, as I said, is part of the core language. If you mention ‘record’ within a ‘tell application “Database Events”’ statement, it’s understood to be the Database Events term. Otherwise it’s the “vanilla” (core AppleScript) term.

‘whose’ filters aren’t implemented in the core language, but may be implemented by scriptable applications. They can make life easier for scripters, but often turn out to be quite slow in operation. Some applications are worse than others. I suspect it’s something to do with the way their AppleScript abilities are bolted on after they’ve been designed to be operated manually. I’ve never used Database Events myself, but it was specifically designed to be scripted, so maybe its ‘whose’ filters are indeed as fast as claimed in the Soghoian/Cheeseman book.

Hello Tim.

Thanks for a great link, I will certainly read about those workflows.

Just to clarify, when wrote that sentence, I had an SQL query, from an RDBMS (Relational Database Management System) in mind, this can of course also be utilized with dabase events, so that you specify a query that will return the lowest number of records, (if that is the most feasible) that way, you let database events do most of the work.

Edit

mouramartins did an analysis, that is interesting concerning File Maker Pro: MacScripter / Getting values from FileMaker using whose clauses.