Skip to main content
Tweeted twitter.com/StackDrupal/status/805646119141339136
added 550 characters in body; edited tags; edited title
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182

Rules how How to create a rule to combine term namesthe terms of 2 fields to create a new term and set as term referencestore it in a 3rd field?

I have a content type that has 3 term reference fields: A, B, and C

  • Field A (required), which contains a single tag.
  • Field B (required), which contains a single tag.
  • Field C (not required), which contains a single tag.

The tags from those 3 fields all related to the same taxonomy.

User fill in A and BWhen creating or updating a node, by rules getvalues are entered for field A and B then action. I want to have a rule ((using the Rules module) with some Rules Action to set dataa data value tofor field C, but itequal to the concatenation of the value entered for field A and B. But "set a data value" only sets one value. 

What can I do to set multiple values?

Some more screenprints to explain all this:

enter image description here   

enter image description here   

enter image description here

And here is my current Rule I'm trying to get to work:

{ "rules_juhe_xieru" : {
    "LABEL" : "\u805a\u5408\u5206\u7c7b\u81ea\u52a8\u5199\u5165",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules" ],
    "ON" : { "node_insert--mfpf" : { "bundle" : "mfpf" } },
    "DO" : [
      { "data_set" : { "data" : [ "node:field-juhe-fenlei" ], "value" : [ "node:field-diqu" ] } }
    ]
  }
}

Rules how to combine term names to create a new term and set as term reference

I have a content type that has 3 term reference fields: A, B, and C.

User fill in A and B, by rules get A and B then action set data value to C, but it only sets one value. What can I do to set multiple values?

enter image description here  enter image description here  enter image description here

{ "rules_juhe_xieru" : {
    "LABEL" : "\u805a\u5408\u5206\u7c7b\u81ea\u52a8\u5199\u5165",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules" ],
    "ON" : { "node_insert--mfpf" : { "bundle" : "mfpf" } },
    "DO" : [
      { "data_set" : { "data" : [ "node:field-juhe-fenlei" ], "value" : [ "node:field-diqu" ] } }
    ]
  }
}

How to create a rule to combine the terms of 2 fields to create a new term and store it in a 3rd field?

I have a content type that has 3 term reference fields:

  • Field A (required), which contains a single tag.
  • Field B (required), which contains a single tag.
  • Field C (not required), which contains a single tag.

The tags from those 3 fields all related to the same taxonomy.

When creating or updating a node, values are entered for field A and B. I want to have a rule ((using the Rules module) with some Rules Action to set a data value for field C, equal to the concatenation of the value entered for field A and B. But "set a data value" only sets one value. 

What can I do to set multiple values?

Some more screenprints to explain all this:

enter image description here 

enter image description here 

enter image description here

And here is my current Rule I'm trying to get to work:

{ "rules_juhe_xieru" : {
    "LABEL" : "\u805a\u5408\u5206\u7c7b\u81ea\u52a8\u5199\u5165",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules" ],
    "ON" : { "node_insert--mfpf" : { "bundle" : "mfpf" } },
    "DO" : [
      { "data_set" : { "data" : [ "node:field-juhe-fenlei" ], "value" : [ "node:field-diqu" ] } }
    ]
  }
}
edited title
Link
No Sssweat
  • 31.6k
  • 14
  • 55
  • 91

How Rules how to in action of rules,combine term names to create a new term and set Multiple date value?as term reference

edited body
Source Link
LIUJIAHUI
  • 211
  • 1
  • 9

I have a content type that has 3 term reference fields: A, B, and C.

User fill in A and B, by rules get A and B then action set data value to C, but it only sets one value. What can I do to set multiple values?

enter image description hereenter image description here enter image description here enter image description here

{ "rules_juhe_xieru" : {
    "LABEL" : "\u805a\u5408\u5206\u7c7b\u81ea\u52a8\u5199\u5165",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules" ],
    "ON" : { "node_insert--mfpf" : { "bundle" : "mfpf" } },
    "DO" : [
      { "data_set" : { "data" : [ "node:field-juhe-fenlei" ], "value" : [ "node:field-diqu" ] } }
    ]
  }
}

I have a content type that has 3 term reference fields: A, B, and C.

User fill in A and B, by rules get A and B then action set data value to C, but it only sets one value. What can I do to set multiple values?

enter image description here enter image description here enter image description here

{ "rules_juhe_xieru" : {
    "LABEL" : "\u805a\u5408\u5206\u7c7b\u81ea\u52a8\u5199\u5165",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules" ],
    "ON" : { "node_insert--mfpf" : { "bundle" : "mfpf" } },
    "DO" : [
      { "data_set" : { "data" : [ "node:field-juhe-fenlei" ], "value" : [ "node:field-diqu" ] } }
    ]
  }
}

I have a content type that has 3 term reference fields: A, B, and C.

User fill in A and B, by rules get A and B then action set data value to C, but it only sets one value. What can I do to set multiple values?

enter image description here enter image description here enter image description here

{ "rules_juhe_xieru" : {
    "LABEL" : "\u805a\u5408\u5206\u7c7b\u81ea\u52a8\u5199\u5165",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules" ],
    "ON" : { "node_insert--mfpf" : { "bundle" : "mfpf" } },
    "DO" : [
      { "data_set" : { "data" : [ "node:field-juhe-fenlei" ], "value" : [ "node:field-diqu" ] } }
    ]
  }
}
added 3 characters in body
Source Link
No Sssweat
  • 31.6k
  • 14
  • 55
  • 91
Loading
deleted 1 character in body
Source Link
No Sssweat
  • 31.6k
  • 14
  • 55
  • 91
Loading
added 46 characters in body
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182
Loading
added 372 characters in body
Source Link
LIUJIAHUI
  • 211
  • 1
  • 9
Loading
added 171 characters in body
Source Link
LIUJIAHUI
  • 211
  • 1
  • 9
Loading
Source Link
LIUJIAHUI
  • 211
  • 1
  • 9
Loading