I would like to set up rule to detect if I change one specific field in the content type. For example if I choose the field "dyzury", then the rule will publish this node to the front page with the new value in the field.
How can I achieve this?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
Set the rule to fire on the event Before saving content so you will have both values of the field available.
Set the conditions as follows:
Node is of type and select your content type.
AND Entity is new. Your data selector should be
Node and negate the condition (NOT new)
AND Entity has field, Again your data selector should be
Node and select your field_dyzury from the drop-down list to make the field available to the rule.
AND Data comparision and using data selectors for both values choose
[node:field-dyzury]. Select the
Equals operator and negate the condition (NOT equal)
It is important to detect that the node is not new, or there will be no existing data value for the comparison.
Then set the Action to Promote content to front page. Again, data selector should be
This rule will detect any change in field_dyzury, and will promote the content to the front page when a change is detected.
The conditions should look like:
+ Content is of Type + AND + NOT Entity is new + AND + Entity has field + AND + NOT Data comparison
The AND's force the rule to require ALL of the conditions to evaluate to true before the actions are performed.