Closed (fixed)
Project:
Rules
Version:
7.x-2.1
Component:
Rules Core
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Apr 2012 at 12:35 UTC
Updated:
17 Apr 2019 at 03:39 UTC
Jump to comment: Most recent
Comments
Comment #1
tr commentedRules cannot know how many values are actually in the list until your rule executes - one list can have 1 value, another list can have three values, etc. Tokens are generated for the list as a whole, and individually for the first four values as a convenience. Most processing of lists will have to be done in a loop because elements in a list are not sorted or stored in any particular order and there is no "key" you can use to access individual items.
If you want to test all the elements in a list, you need to loop over the elements of the list. There is some documentation with examples at
https://www.drupal.org/node/1803938, and I was also able to find some with a google search, so I'm not going to go into detail about how to set up a loop here unless you have some specific questions.
Comment #2
tr commented