I have two node types: Item and Order. I have an entity reference (
field_items) set up on the Order content type which references Item (1 Order to N Items).
The Item has a field (
field_reservation_status) which is a drop-down list of strings.
I am trying to set up a rule so that when I allocate an Item to an Order on the Order form, the reservation status on the related Item will be set to "Reserved".
I am doing this with a reacting rule and a rule component as follows.
Condition: Node is of type "Item"
Action: Set a data value (this should set field_reservation_status on the node that the component is actioning to "Reserved")
Event: When a content node is saved
Condition: Node is of type "Order"
Action: Add a variable (this should store field_items for the current Order node)
Action: Call the rule component
In the rules config UI I can't see any "Add Loop" button - is this to be expected in version D8 Alpha 3?
What data selector should I use for accessing field_items on the Order node that has just been saved?
What data selector should I use in the rules component to access field_reservation_status on the current object from field_items?
How do I set up a loop over the variable that is created in the reacting rule?
No doubt I'll have more questions.