I have two content types A and B and I have two rules. I am trying to add the text put in the A text field of content type A into the B text field of content type B.
On rule two I am using the set data value but it is not working. Have I missed anything or have I setup my rule incorrectly? If anybody can point out where I went wrong it would be much appreciated.
Rule 1 creates a node from content type B when a node is created with content type A.
Export of Rule 1:
{ "rules_ref" : {
"LABEL" : "Ref",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules" ],
"ON" : { "node_insert--a" : { "bundle" : "a" } },
"DO" : [
{ "entity_create" : {
"USING" : {
"type" : "node",
"param_type" : "b",
"param_title" : [ "node:type" ],
"param_author" : [ "node:author" ]
},
"PROVIDE" : { "entity_created" : { "entity_created" : "Created entity" } }
}
}
]
} }
Rule2 takes the value from A text field in the A content type and adds it to the B text field in the B content Type.
Export of Rule 2:
{ "rules_ref2" : {
"LABEL" : "Ref2",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules" ],
"ON" : { "node_insert--b" : { "bundle" : "b" } },
"IF" : [
{ "entity_has_field" : { "entity" : [ "node" ], "field" : "field_a_text" } },
{ "entity_has_field" : { "entity" : [ "node" ], "field" : "field_b_text" } }
],
"DO" : [
{ "data_set" : { "data" : [ "node:field-b-text" ], "value" : "[node:field-a-text]" } }
]
} }