Rules - Conditions for update action on one-to-* relations

I came across something that was a bit odd. When you setup a rule which is meant to update related entities, if the relation is many-to-many, then the creator is able to set some conditions on which records (if any) are to be updated in that step:

image

However, if the relation is a one-to-*, then you don’t have the ability to setup any condition filters (to potentially exclude the related entity from the update at that time) and any updates that you define are just made with no further checking:

image

Is there a reason why this has been done? Is there any reason why the options to set conditions couldn’t be added to update actions for one-to-* relations?

1 Like

In such a situation, you can probably achieve the goal by either

  • including a filter in the trigger for the automation (may require a lookup/formula field in the original db)
  • incorporating the condition in the update action via a formula

Thanks for the options:

I think the lookup from the original db is the only option I have since the field I am trying to update is a single-select field (per Setting dropdown value via formula , we can’t use a formula for setting the value).

I guess the third option is using a script to do all the update steps in one :slight_smile:

Is there any value in creating a feature request for this or is there an underlying limitation which makes this difficult?

There is no underlying limitation, but rather that in most cases, a filter only makes sense if you want to update (or delete or whatever) a subset of linked items, therefore it is meaningless for to-one relations.

It would be solved if/when there was the option to define trigger filters using formulas, in which case, you would only trigger the automation in the case where the related entity meets the required criteria.

In your case, the current workaround is a lookup / formula field on the triggering entity.

1 Like