I have a node type with a Double Field of Text Field & Text Area. Users can create unlimited Double Field value.

Using rules, I want to automatically create nodes for each Double Field value, using Text Field as Node Title, and Text Area as Node Body. I have tried without success, how do I achieve this?

Comments

cnario created an issue. See original summary.

Chi’s picture

I have a node type with a Double Field of Term Reference & Text Area.

Double field has no support for Term references.

cnario’s picture

Oh, sorry. it's Text Field and Text Area

cnario’s picture

Issue summary: View changes
Chi’s picture

Status: Active » Fixed

This rule creates pages using multivalue double field on article content type.

{ "rules_auto_create_node" : {
    "LABEL" : "Auto create node",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules" ],
    "ON" : { "node_insert--article" : { "bundle" : "article" } },
    "DO" : [
      { "LOOP" : {
          "USING" : { "list" : [ "node:field-example" ] },
          "ITEM" : { "double_field_item" : "Current list item" },
          "DO" : [
            { "entity_create" : {
                "USING" : {
                  "type" : "node",
                  "param_type" : "page",
                  "param_title" : [ "double-field-item:first" ],
                  "param_author" : [ "node:author" ]
                },
                "PROVIDE" : { "entity_created" : { "sub_node" : "Sub node" } }
              }
            },
            { "data_set" : {
                "data" : [ "sub-node:body:value" ],
                "value" : [ "double-field-item:second" ]
              }
            },
            { "entity_save" : { "data" : [ "sub-node" ], "immediate" : "1" } }
          ]
        }
      }
    ]
  }
}

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.