3

I've a Rule with below specification

Events:
After updating an existing user account

Conditions:
???

Actions
Create a Message

But I don't know how can I set a condition on field in rule condition part that return true when the field changed,any body know how can I add condition on specified field that return true when the field changed?

3
  • Hello. Could you try to write your question again? I can't figure what you need. I guess you are not English native speaker. That's fine, neither am I, but we need to put an extra level of care to make our questions understandable for wider audience - and thus answerable.
    – Mołot
    Commented Dec 2, 2013 at 9:24
  • how can i create rules condition for event when changed value of field !? EX: when user change avatar @Molot
    – user1630
    Commented Dec 2, 2013 at 9:33
  • Possibly related: drupal.stackexchange.com/q/93997/16495 drupal.stackexchange.com/q/74956/16495 Maybe this one is duplicate of one of them, but I still don't quite understand. Or I don't know if I understood.
    – Mołot
    Commented Dec 2, 2013 at 9:38

2 Answers 2

9

You need to create the rule for Before saving content rather than After saving content.

Before saving content has both the original node values and the new updated values which allows you to compare the values.

After saving content only has the updated values, so you won't be able to see what the old values are.

1

Condition: Data comparison

DATA TO COMPARE

In Data selector you have two different states "account (updated user)" and "account-unchanged (unchanged user)".
Check field from account (updated user) and click "Continue".

On next screen click "Switch to data selection" button and find your field but from account-unchanged state.

Select Value to equals and don't forget to check "Negate" at very bottom.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.