Sure you can do this "without custom code" (and more important: without the need to enable the dangerous PHP filter ...). Read on for more details about how to get this to work ... and not only to discover new items added to the list (as in your question), but also to discover items removed from the list.
To process a multi-value field with Rules, I think you should use a completed different approach, which is related to the Rules Condition "List contains item" (and the negations of it).
Have a look at this rules example (in Rules export format), which processes a multi-value field also, in my case it is a list of eMail Ids (replace "eMail ID" by whatever matches your case):
{ "rules_verify_updates_to_selected_email_ids" : {
"LABEL" : "Verify updates to selected eMail IDs",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules_conditional", "rules" ],
"ON" : { "node_update--article" : { "bundle" : "article" } },
"DO" : [
{ "LOOP" : {
"USING" : { "list" : [ "node-unchanged:field-email-addresses" ] },
"ITEM" : { "previous_email_id" : "Previous eMail ID" },
"DO" : [
{ "CONDITIONAL" : [
{
"IF" : { "NOT list_contains" : {
"list" : [ "node:field-email-addresses" ],
"item" : [ "previous-email-id" ]
}
},
"DO" : [
{ "drupal_message" : { "message" : "Value [previous-email-id:value] was removed from the multi value field." } }
]
}
]
}
]
}
},
{ "LOOP" : {
"USING" : { "list" : [ "node:field-email-addresses" ] },
"ITEM" : { "current_email_id" : "Current eMail ID" },
"DO" : [
{ "CONDITIONAL" : [
{
"IF" : { "NOT list_contains" : {
"list" : [ "node-unchanged:field-email-addresses" ],
"item" : [ "current-email-id" ]
}
},
"DO" : [
{ "drupal_message" : { "message" : "Value [current-email-id:value] was added to the multi value field." } }
]
}
]
}
]
}
}
]
}
}
If you just replace the machine name "field-email-addresses
" by the machine name of your field (prior to import), you should be able to experiment with this rule in your own site to see it at work (for nodes of content type "Article", adapt this type to fit your needs).
Here is a sample of the messages I get when I update an article, and while doing so I add 1 more eMail ID and at the same time I remove an existing eMail Id:
Value [email protected] was removed from the multi value field.
Value [email protected] was added to the multi value field.
So the clue to make this work is:
- first iterate over all field values of your field of the unchanged node (to find the removed values).
- then also iterate over all field values of your field of the changed node (to find the inserted values).
Note: As an alternative to using the Conditional Rules module (which is required for this rule to work), you can also rework the relevant part of my Rules example into performing equivalent Rules Component. For more details on using Rules Components instead of Conditional Rules, refer to the answer to "What's the alternative to using the Conditional Rules module?".
PS: I'm assuming this question is about D7.