Hi Luisa,
If your entities are inside a List, you can just go through every element of the List with a for
statement and call a service of the entity if the id
is 35. Don't worry about the execution speed : for
loops are extremely fast.
If you have more than one 'id' that you want to address, you can make a list of them and call the service of an entity if the id
of that entity is contained by that List. Here is an example :
...
fix entitiieslist = somedatafacer.readAll
fix idselection = List|of(7,12,35,41)
...
for (oneentity:entitieslist) {
if ( idselection.contains(oneentity.id) ) oneentity.someservice()
}
...
In the example here, I created the list idselection
by hand with a List|of(...)
but of course you could imagine building such a list as being the result of some computations that would extract a series of selected id
that you want to later use for calling services.