O$ List Intersect for Studio 5 on GitHub

Doug Easterbrook doug at artsman.com
Tue Jan 16 23:30:20 EST 2018

I just saw this —

we wrote a json external for Studio 5 that we’ve been using for a few years and there is an external for studio 8.1 as well.

lets you traverse the entire json document tree — of course ..   given to the community already.

Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
Phone (403) 650-1978

see you at the third annual users conference
https://tickets.proctors.org/TheatreManager/95/online?performance=29086 <https://tickets.proctors.org/TheatreManager/95/online?performance=29086>

> On Jan 15, 2018, at 10:50 PM, Paul Mulroney <pmulroney at logicaldevelopments.com.au> wrote:
> Hi $All,
> Here’s another one:
> https://github.com/pmulroney/ListIntersect_for_Studio5
> From the ReadMe:
> ListIntersect
> Omnis Lists are powerful constructs that allow us to manipulate data in memory. A common operation is selecting lines in the list, often based on another list. A fairly simple way to do this would be to have two nested loop operations like the following pseudocode:
> For vList1.$line from 1 to vList1.$linecount step 1
>   For vList2.$line from 1 to vList2.$linecount step 1
>      If vList1.field=vList2.field
>         Select list line(s) {#L}
>   End For
> End For
> For this code, it executes the inner loop n x m times – where n = list 1 linecount, and m = list 2 linecount. If List 1 or List 2 are large, then you could be executing the inner loop millions of times, and take a significant amount of time to do so.
> This is where the $ListIntersect() function comes in. This method has been written so that you only process the smallest list *once*, which results n a significant performance increase.
> This is really cool, so if you’re going to pinch it, make sure you acknowledge us ok?
> oListInterection.$ListIntersect(plList1,plList2,psFieldname,psFieldtype)
> IN:
> 	• plList1 – the larger of the two lists to process. It can have duplicate values in the column that you’re testing
> 	• plList2 – the smaller of the two lists.
> 	• psFieldname – the column name in the list that you’re comparing again
> 	• psFieldtype – options are Char, Int, Num or Date.
> OUT: All lines in list1 that exist in list2 will be selected in list1.
> Both lists will be sorted by the nominated field name.
> The comparison column must be the same name/type in both lists.
> See Example1 for a trivial example of this method in operation. For a given list of cities/states in Australia, only select lines for a number of cities
> In our software we use it as part of our search filtering process for some reports.
> @pmulroney, submitted on behalf of Logical Developments
> Regards,
> Paul.
> Television may insult your intelligence, but nothing rubs it in like a computer.
> --
> Paul W. Mulroney                                            We Don't Do Simple Pty Ltd
> pmulroney at logicaldevelopments.com.au       Trading as Logical Developments
> www.logicaldevelopments.com.au                   ACN 161 009 374
> Ph: +61 8 9458 3889                                       86 Coolgardie Street
>                                                                         BENTLEY  WA  6102
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com

More information about the omnisdev-en mailing list