Affecting rules on a node containing a field collection?

Events happening in the community are now at Drupal community events on www.drupal.org.
wipeout_dude's picture

Hi,

I am trying to create a rule that will modify the permissions (ACL) of the node containing the field collection based on a user reference field in the field collection entity..

By the looks of it I have to use "field-collection-item:host-entity:" but in the data selector is doesn't have any further options to pick up the node id or anything for the host entity..

I am sure I am probably missing something simple but can't see it..

The rule I am trying to create is simply if a field collection item is created where the field collection contains the user reference field set view permission to the node containing that field collection entity..

Anyone got any suggestions?

Thanks.

Comments

Can you describe your rules

dimsum's picture

Can you describe your rules settings or what you want it to be? Such as:

Events:

Conditions:

Actions:

I've been struggling with Rules and Field Collection these past few weeks. Only to realize just now that Field Collection is an entity which attached to another Node. So if you need to do something with the Field Collection values you need to select the entity (Field Collection), not the node.

I hope i'm being clear enough :)

Yes, thanks I did work that

wipeout_dude's picture

Yes, thanks I did work that out eventually.. Sorry, I should have come back and posted that..

Also for anyone else that comes across this thread.. A field collection can be addressed as a "list" as well so a loop can be created to process through all the items in the field collection and do whatever it is you need it to..

Hey wipeout_dude, did you

dimsum's picture

Hey wipeout_dude, did you figure out how to do that as a Conditions? I've been trying to figure this out for a couple of hours.

@dimsum - What do you mean as

wipeout_dude's picture

@dimsum - What do you mean as conditions?

If you mean that you woant to go through the field collection as a list but only react on some of them based on a condition then the only way I can think of to do that would be to create a component that had the conditions and call the component from the loop.. Hope that makes sense..

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week