I think in this case it makes a lot more sense to create a search, e.g.
Search name "Primary"
Code:
#magazine_title:"=New Scientist" or #magazine_title:"=PC Advisor" or #magazine_title:"=PC Magazine" or #magazine_title:"=PC Powerplay" or #magazine_title:"=PC Pro" or #magazine_title:"=PC World" or #magazine_title:"=Popular Science"
But you can achieve the effect you want with this template:
(change the three constants at the top to suit your needs)
Code:
program:
primary_listitems = 'New Scientist, PC Advisor, PC Magazine, PC Powerplay, PC Pro, PC World, Popular Science';
secondary_listitems = 'World';
title = '#magazine_title';
str_in_list(
primary_listitems,
',',
title,
'primary',
str_in_list(
secondary_listitems,
',',
title,
'secodary',
'other'
)
);