Quote:
Originally Posted by iienderii
I have a column which shows the title of the publication (in this case, it's a magazine library). Of those collected, I have a custom column called 'Category.' That field is based on a separate lookup-type table where I just decided which magazines are either 'primary,' 'secondary,' or 'other.' I'd like the 'Category' column to automatically populate with a pre-determined 'primary,' 'secondary,' or 'other' based on what I choose for 'Magazine Title.'
|
So, in pseudo code terms this is:
Code:
primary_mags = ('New Scientist', 'PC Advisor', 'PC Magazine')
secondary_mags = ('World', 'Some other Magazine')
if magazine_title in primary_mags:
return "Primary"
else if magazine_title in secondary_mags:
return "Secondary"
return "Other"
I don't use the template language enough to write it without some experimentation. I can do that tonight.
But, is this really worth it? If you have to manually set the magazine title, I'm not sure that automatically setting the category gains you much. Especially as you have to maintain the template with the list titles in each category.