Here is another broad question whose answers could potentially help us fellow drupal developers....
I would like to create a rules trigger than does a comparision of two cck fields of two different nodes, and then do an action accordingly. Basically.
Let's say, for example, the end action will be to publish a node of a certain content type. (This is assuming that the workflow of the particular content type is set to "unpublished" as default) I would like the action of publishing the content depending on whether cck field A (an integer) of X content type in question, is less than or equal to cck field B of content type Y, another integer data type. This comparison is done immediately after the action, "new content is saved".
Which rules condition do I use, truth value? custom php?
How would I begin to approach this?
Articles, ideas, code snippets are welcome, and could result in a new book page.
Comments
Any ideas? This topic is
Any ideas?
This topic is broad, but any help with this would be appreciated!
computed_field & rules
The following module can make calculations on fields: http://drupal.org/project/computed_field
Then Rules can trigger actions http://drupal.org/project/rules
How are the two nodes
How are the two nodes related? You'll have to load the other node when saving the original node, but there will have to be some kind of relationship defined (maybe node reference) to know which corresponding node to load.
Then you can compare the two fields using rules "Numeric comparison" to determine if A is less than or equal to B and perform whatever actions you like after that.