Active
Project:
Webform Rules
Version:
7.x-1.6
Component:
Code
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Apr 2021 at 23:24 UTC
Updated:
19 Apr 2021 at 23:24 UTC
Jump to comment: Most recent
To whom might be able to help, I have a simple rule that creates a node after a webform submission and fetches the data of a field from a submission to populate a field in the created node. Works great with single values, either select lists or just text fields, but fails if I use multiple values. What am I missing?
{ "rules_testing_1_2_3" : {
"LABEL" : "Testing 1,2,3",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "webform_rules", "rules" ],
"ON" : { "webform_rules_submit" : [] },
"IF" : [
{ "webform_has_id" : {
"form_id" : [ "form-id" ],
"selected_webform" : { "value" : { "webform-client-form-824" : "webform-client-form-824" } }
}
}
],
"DO" : [
{ "variable_add" : {
"USING" : { "type" : "text", "value" : "[data:testing_field-value-raw]" },
"PROVIDE" : { "variable_added" : { "testing_field" : "Added variable" } }
}
},
{ "variable_add" : {
"USING" : {
"type" : "list\u003Ctext\u003E",
"value" : { "value" : [ "[data:testing_options-value-html]" ] }
},
"PROVIDE" : { "variable_added" : { "testing_options" : "Added variable" } }
}
},
{ "entity_create" : {
"USING" : {
"type" : "node",
"param_type" : "datahub_report_card",
"param_title" : "[user:field_ureg_name_dental_school] [user:field_ureg_name_institution]",
"param_author" : [ "user" ]
},
"PROVIDE" : { "entity_created" : { "entity_created" : "Created entity" } }
}
},
{ "data_set" : {
"data" : [ "entity-created:field-qa-link:url" ],
"value" : [ "testing-field" ]
}
},
{ "data_set" : {
"data" : [ "entity-created:field-programmes" ],
"value" : [ "testing-options" ]
}
}
]
}
}
Comments