1

Using Rules, I am creating relations from a Lab Cage Content Type that has a field that is an entity reference list, where you can select a list of Mice entities. For instance, if the user selects 3 Mice from the Lab Cage's entity reference list field, 3 relations are created between the Lab Cage and each Mouse. How would I be able to manipulate the fields of the Mouse in Rules? Rules doesn't recognize that the entity reference list field contains entities with the Mice content type, so I cannot select fields related to that content type. Here is my rule so far:

Event

After saving new content

Conditions

Node is of type Lab Cage

Actions

Loop through an entity reference list in Lab Cage (called node:field-micelist), gives me each item as a variable list_item

I create a new list (create_relation)

Add an item to a list create_relation (list_item)

Add an item to a list create_relation (node)

Create a new entity Relation between endpoints in create_relation list

Save entity

My question comes in the next action I'm trying to accomplish:

2. Next I want to set a data value to a field from the Mice endpoints, basically I want to copy data from a field in Lab Cage to a field in a Mouse. Is this possible?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.