Your question is not clear (enough), at least not yet, so I'll try with 2 variations ...
Field C is about Single values
It think your rule needs at least 2 corrections:
- Add a Rules condition like "entity has field", for each "token" that you want to use in any rules Action, but which is not (yet) showing up to actually select it in some Rules Action.
- When using a Rules Action like "Set a data value", you can indeed only set such value for 1 variable. However if you want to "Set a data value" for another variable, just add a 2nd Rules Action to do so for that other variable.
Field C is about Multiple values
Maybe your question is rather something like so:
If this Rules Event happens, then I want to add the node reference in field A to field C, and I also want to add the node reference in field B to field C (and field C is a multi value node reference field".
In this case, using "Set a data value" is completely wrong. Instead you need to use an action like "Add item to a list". I.e.:
- Rules Action 1 is to add A to the list C (possibly you also need a Rules Condition like "Entity has field" (for A)).
- Rules Action 2 is to add B to the list C (possibly you also need a Rules Condition like "Entity has field" (for B)).
Refer to my answer to "How to set multiple values to an unlimited Term Refence field with Rules" for way more details about "Add item to a list".
Recommendations to improve the alternative answer
Now (after about a day of extra questions/comments to the question from No Sssweat and myself), it finally became clear what the real question was ...
Here is a variation of the Rule in the alternative answer:
{ "rules_improved_combination_of_taxonomy_terms" : {
"LABEL" : "Improved combination of taxonomy terms",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules" ],
"ON" : { "node_view--article" : { "bundle" : "article" } },
"DO" : [
{ "drupal_message" : { "message" : "[node:field-a][node:field-b]" } },
{ "variable_add" : {
"USING" : { "type" : "text", "value" : "[node:field-a][node:field-b]" },
"PROVIDE" : { "variable_added" : { "variable_added" : "Added variable" } }
}
},
{ "entity_create" : {
"USING" : {
"type" : "taxonomy_term",
"param_name" : "[variable-added:value]",
"param_vocabulary" : "tags"
},
"PROVIDE" : { "entity_created" : { "entity_created" : "Created entity" } }
}
},
{ "entity_save" : { "data" : [ "entity-created" ], "immediate" : "1" } },
{ "data_set" : { "data" : [ "node:field-c" ], "value" : [ "entity-created" ] } },
{ "entity_save" : { "data" : [ "node:field-c" ], "immediate" : "1" } }
]
}
}
These are the extra refinements needed to make it work:
- Add an action to save an entity (twice), because since you used Rules Event to just wake up after viewing a node, you need to remind the Rules module to also save what you've been creating/updating.
- Remove the Fetch entity (no need for that).
By the way, the clue to debug the rule in the other answer can be found if you turn on rules logging: you'll see that the fetch entity didn't return any results, so blank, which is also what got saved in field C ...
Demo:
Field A: Bonjour
Field B: World
Field C: BonjourWorld
At least that's what happened in my tests. If I change A to Hello
(or No
), B to Liu
(or Sssweat
), then C gets updated to HelloLiu
(or NoSssweat
) ...
Be Aware: I can think of some further improvements of all this, but for now I consider this rule as "Make it right before you make it better" ... try it in your own setup to confirm it does answer the quetion (but please don't post enhancement requests via extra comments, instead post a new question if needed).
Disclaimer: I don't have a clue what those non-English "pictures" are (I bet they are characters in your native language ...).