I’m not sure how that fits with what I’d like to do, Jeremy. Getting an entity 
selection, transforming it into a collection, fiddling with the collection and 
putting it back does seem rather involved.

Old:
ALL RECORDS([numbers])
APPLY TO SELECTION([numbers]phone:=“+44”+[numbers]phone)

ORDA:
For each ($number;ds.numbers.all())
        $number.phone:=“44”+$number.phone
        $number.save()
End for each

What I was looking for was something like

ds.numbers.all().applyToEach(“number = :1”; ”44”+number)

But if it’s not there, the hassle isn’t great.

Jeremy

> On 29 Feb 2020, at 16:54, Jeremy French <[email protected]> wrote:
> 
> Have you looked at the data class method “fromCollection”?
> 
> https://doc.4d.com/4Dv18/4D/18/dataClassfromCollection.305-4505892.en.html
> 
> Sent from my iPad
>> On Feb 29, 2020, at 11:25 AM, Jeremy Roussak via 4D_Tech 
>> <[email protected]> wrote:
>> 
>> equivalent of APPLY TO SELECTION for an entity selection?

**********************************************************************
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]
**********************************************************************

Reply via email to