1

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?

1

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:

  1. Node is of type and select your content type.

  2. AND Entity is new. Your data selector should be Node and negate the condition (NOT new)

  3. 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.

  4. AND Data comparision and using data selectors for both values choose [node-unchanged:field-dyzury] and [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 Node.

This rule will detect any change in field_dyzury, and will promote the content to the front page when a change is detected.

Edit:

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.

  • Thanks a lot :) But it is a problem :( If I don't change the field this solutions make an action :( Could you check if I have done fine every configuration? 150.254.36.80/wige/sites/default/files/… – user1508670 Jun 2 '13 at 19:58
  • You forgot the AND's. – Triskelion Jun 2 '13 at 20:05
  • Just had a look at your new screenshot, and it looks fine, but you should keep it simple for testing (just one action, say 'Promote to front page'). Did you select the Equals operator in your Data comparison condition? If you go into publishing options and uncheck the 'Promote to front page' (no other changes), is the node removed from the front page when you save it? Also did you clear your caches? – Triskelion Jun 2 '13 at 21:13
  • Not familiar with your Drupal language distribution. The pipe symbol '|' I am assuming is being produced when you select 'Dodaj and'. – Triskelion Jun 2 '13 at 21:24
  • I=AND I attach a screenshot of not Data comparison 150.254.36.80/wige/sites/default/files/… It doesn't work after I cleared my caches – user1508670 Jun 2 '13 at 21:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.