2

I am trying to create a column that will display a person or group content type (with active presence displayed) for all Active Directory users and/or a single line of text for all inactive users no longer in Active Directory. The inactive users are needed to migrate historical records to the new SharePoint list. These items will are often searched and referenced. The person/group content type for active users will be used for audience targeting, specified views, permissions, and workflows.

Ideally, the column would allow select from 2 content types, but based the research I've done over the last few days, it appears that this is not something that can be done (at least without additional programs/add-ins which are not a viable solution at this point). My other thought was to have a column display based on condition, ie, if column X contains display value from Column X, else display value (choices) from Column Y. I am not sure how one would do this for an input field.

I am a relative newbie, so it is possible that there is something simple that I am overlooking. Any advice on the best way to proceed (and or links to how to articles) would be greatly appreciated.

THINGS TRIED SO FAR: I have tried using a multi-field look-up, which only returns a single line of text. I"ve looked into creating custom site content type, but do not know too much about implementing this and have not been able to set a column to the new content type containing both text and people/group.

1

As far as I know, this isn't something you can achieve.

First of all, let's start with a little clarification. Bear with me but I think there is a little confusion in your question, so probably is better if I start with some assumptions.

Fields and content types in SharePoint are separate entities. To keep it as simple as possible, consider a content type as a named group of fields, where fields are just single values you can store as metadata for an item. Content type exist for at least two main purposes:

  • classifying items : one item can be associate just to one content type, so it can be use to classify items.
  • grouping metatada : you define a common set of fields that have a significance for a specific type of items

With this in mind, your question is open to two possible solutions.

The first one - A single Field that can have have two possible values.
The idea is that the same field would allow for either a people value or a text value - and the two values shouldn't be present at the same time. As I already anticipated, afaik this can't be achieved, for the simple reason that SharePoint maps a field to a single data type (as as such to a single database level representation). Your only option given you use SP 2010 would be probably a custom field (on SP 2013 you could maybe try JSLink, but I am not sure you would get far): the problem is that custom field aren't the simple customization to build (you will need to develop a Visual Studio solution) and also you would still need to have a single database level datatype. Given that you need to support arbitrary text, you would need to build up a custom text field, with all the problems related to how to store the info about what you actually inserted from a logical prospective (it is just a text or a representation of a SharePoint user?)

A probable simpler solution would be using TWO fields and customizing the list view to only show a calculated value base on which field was filled. This solution will also need some customization. You probably want to add some basic validation to ensure that only one info is added, and this will require customizing the edit, new, display item forms to your needs. In this case, you may get by just using SharePoint Designer.

There is also one last thing to consider: the whole point here is to provide feedback about legacy users.
While the two solution above are equivalent for users that where removed in the past, they may be not be equal in handling users that will disappear in the feature. If an user gets removed today from AD, I believe that SharePoint will keep it in its site collection level private user list, meaning that you won't probably be able to recognize the fact that the user isn't in AD anymore. If that is the case, a custom field will provide the ability to runtime check the user existence, and even provide something like a status icon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.