> I did not find a way how to do a shared collection from selection, You don’t need this. Just pass the object into the process. The object will be copied. If you have performance problems, please let me know your benchmarks.
> creates unordered selection, so order is lost. ds.Table.fromCollection may do > that, but at a cost of significant overhead. Yes indeed. I create an ordered selection from a collection by doing this: ARRAY LONGINT($ids;0) COLLECTION TO ARRAY($collection;$ids) QUERY WITH ARRAY([table]ID;$ids) ORDER BY FORMULA([table];Find in array($ids;[table]ID)) -- Grüße/Regards, [heubach-media] | Christian Sakowski [email protected] Tel: +49/(0)40/52 10 59-23 > Am 18.10.2018 um 14:14 schrieb Peter Bozek <[email protected]>: > > > > On Sat, Oct 13, 2018 at 10:29 PM Christian Sakowski via 4D_Tech > <[email protected]> wrote: > > > > > > > like: > > $object.myIDs:=$entitySelection.toCollection("ID“).extract(„ID“) > > new process(…;$object) > > > > and in the new process just create the new entity selection: > > > > ds.Table.query(„ID IN :1“;$object.myIDs) > > > I tried simpler (but I believe identical) solution: > > $collection:=$selection.ID > $err:=New process("aaExecuteProcess";0;"test";$collection) > ... in the process > > $selection:=ds.Table.query("ID IN :1";$collection) > > There are several problems with it: first, I did not find a way how to do a > shared collection from selection, there is no "New shared collection form > selection". So passing collection to another process probably copies the > collection (I could not find in in documentation.) But more serious problem > for me is there is no way how to pass ordered selection - line > > $selection:=ds.Table.query("ID IN :1";$collection) > > creates unordered selection, so order is lost. ds.Table.fromCollection may do > that, but at a cost of significant overhead. > > So, it seems ORDA is nice, but for more advanced functionality, named > selections are way to go. > > > > > >> I am trying to do something like global named selection. Examples that, > > >> say, pass selections to workers pass a condition to build a selection. > > >> This > > >> seems to restricting. > > >> > > >> Am I overlooking something obvious? > > > -- > > Peter Bozek -- heubach media Osterfeldstr. 12-14 | Haus 1 | Eingang Nord 22529 Hamburg tel: 040 / 52 10 59 - 10 | fax: -99 mail: [email protected] home: www.heubach-media.de Geschäftsführer|CEO: Matthias Heubach Mieten Sie Ihre Computer, iPads & Drucker für Ihre Events bei: http://www.milo-rental.com Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

