I am attempting to set the "Target Audiences" field on a list item programmatically. I have been able to set the value programmatically for one audience, but when I attempt to use multiple audiences, SharePoint tries to interpret the value I am setting as a single audience, rather than multiple. I am setting the value using the code below.
listItem[listItem.Fields["Target Audiences"].InternalName] = "Audience One";
I use this code to specify multiple audiences like so:
listItem[listItem.Fields["Target Audiences"].InternalName] = "Audience One; Audience Two";
When I do this, SharePoint tries to interpret the entire string as a single audience, and I get a message when I edit the list item that says "No exact match was found."
Am I using the correct format for specifying multiple audiences for this field, or is there a class that I should be using similar to SPFieldLookupValue
?