3

I am on Drupal 7 and I am using the Rules module to do some stuff.

I must say that I am not very used to using this module; there are few questions that need answers, such as the use of the node:unchanged token.

For example, when I set a rule with a data comparison as a condition, I have to give the name of the referred field; then, there is either node:changed or node:unchanged.

I am quite accustomed to using node:changed. What does node:unchanged mean?

  • "Un" is a negative prefix in English - if you understand what node:changed means, it's a struggle to see how you wouldn't understand what node:unchanged means. Is it literally just that you didn't know "un" negates the proceeding term in English? – Clive Sep 6 '17 at 13:47
  • Thanx @Clive. Sometimes I mix up things and it becomes hard to understand. It's clear now. Thank u. – mosgeorges Sep 6 '17 at 13:57
  • No problem, I added an answer to clear it up – Clive Sep 6 '17 at 14:04
5

Terminology

"unchanged refers to the value before something (eg, a field of entity user or node) gets updated (the old value that it used to be).

"changed refers to the value after something (eg, a field of entity user or node) gets updated (the new value that it will become).

Examples

Have a look at my answers to these question for some typical usecases of it:

5

"Unchanged" is literally the opposite of "changed" in this context. If you know what node:changed means, just reverse it for node:unchanged.

For reference, though:

  • node:changed refers to a node after field or property data has been changed, following a node save
  • node:unchanged refers to the same node, before field or property data has been changed.

The two are useful together for determining whether a particular field or property value has been changed on a node, and what the value went from/to, in a particular save operation.

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.