R – Can a SharePoint list item have it’s Targeted Audience calculated or otherwise automatically specified

mosssharepoint

I want to show targeted (filtered) content from a list to users. I already have a column in the list that basically has the Target Audience value. This field is a multi-choice column (checkbox input) which I prefer over the current input field for Targeted Audiences.

To get audience filtering to work I unfortunately need to have the Targeted Audience field filled out for every list item. My current plan is to use a simple SharePoint designer workflow to set the Targeted Audiences field based on my other field, but I'm wondering if there is a better way. Am I just looking at this wrong?

Note that I know audiences can also be used to hide/show web parts, but that is not something I am interested in.

Best Answer

I do not believe Target Audiences can be set up as a calculated field, in which case your options are workflow or a list item event receiver.

To set the audience field value, you can use AudienceManager.GetAudienceIDsAsText; Gary Lapointe has a post with example usage.

Related Topic