Hi,
This is a rule attatched to an object called 'Object'🙂
1st case :
If
Object IS NEW
Then
FIND Object WHERE Object.NumberAttribute<300 AND Object.ID<>ThisObject.ID
REDUCE Object.NumberAttribute BY ThisObject.NumberAttribute
Important : ThisObject can't be find by the FIND action.
In this case, the REDUCE action occurs on all Object in the context, that is to say ThisObject and all object find by the FIND action.
2nd case:
If
Object IS NEW
Then
FIND Object WHERE Object.NumberAttribute<300 AND Object.ID<>ThisObject.ID
REDUCE ThatObject.NumberAttribute BY ThisObject.NumberAttribute
In this case, the REDUCE action only occurs on the first Object find by the FIND action (Object with the lowest ID I think). In fact, That prefixe referes to the second object in the context.
So, my question is, when the first object in the context has the same type as a list inserted in the context just after, is there an elegant way to apply an action on this list only?
Warm regards,
Christophe