Hi, I'm needing a little support on this.

I have this situation: I have one node that is referenced by others via node reference field. If I delete this node, I'd like that all others that do this reference to be delete too.

So I did a view with VBO that relates me all nodes that reference that one, passing the nid through a argument, and only one action attributed, delete node. That shows me all the necessary nodes, it works well.

Then I went to Rules, started creating a rule that when after that kind of node is deleted, do some action. In this case, it should be "Execute a VBO programmatically". But how to pass the argument from that node to the view? This is the point I didn't got. There is no Rules variables available, just $object and $context? (as observed in the fields explanations, but I couldn't even understand for what they reference to, is it from views or for rules?)

Also, I couldn't found in the issues anything similar to this (with node reference), so I decided to start a new one.

All help will be welcomed.

Thanks for attention!

Comments

Vuds’s picture

Title: Help for deleting nodes that reference the current node (node reference, views, rules) » Display and inform that Rules variables are allowed for use in Rules Actions "Execute VBO programatically..."
Category: support » feature

Nevermind, I could do it with 1.x-dev (I realized after install this version over 1.9). But I'm changing the request because there isn't yet directions to use the Rules variables such $node, $author, $user (all the variables that normally should appear under the fieldset "PHP Evaluation").

Thanks!

infojunkie’s picture

Thanks for this information. I will look for a way to find that the action has those extra variables available to it when it's invoked via Rules.

infojunkie’s picture

Issue tags: +r1.11

Tagging for next release.

that0n3guy’s picture

subscibing

open social’s picture

What is the status of this now?

Can we use $node?

open social’s picture

Status:

It is possible to use $object->nid

$object was in my case the node

you can use get_defined_vars();

bojanz’s picture

Status: Active » Closed (won't fix)

VBO for D6 is in maintenance mode and will receive only fixes contributed and tested by the community.
Reopen with a patch.