Hello,
RELATE MANY SELECTION is a convenient way to get a set of related many records.
Is there a more succinct or efficient ORDA method than the following to do the
same thing?
// get Contracts for a group of Clients
ARRAY TEXT($array;0)
C_COLLECTION($col)
$clients:=ds.Client.query("Name = :1";"@"+Self->+"@") // get the clients
$col:=$clients.toCollection("PriKey") // make a Collection of Client Primary
Keys ("PriKey";"..Value..";"PriKey...)
COLLECTION TO ARRAY($col;$array;"PriKey") // make it an array of Primary Keys
ARRAY TO COLLECTION($col;$array) // back to a Collection of Text
("..Value..";"..Value..")
EntSel:=ds.Contract.query("to_Client IN :1";$col) // search in the Collection
Thanks - Keith CDI
**********************************************************************
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]
**********************************************************************