0

I have created a people picker in list definition. When I add an item to a list it is showing the domain\username. But I want firstname, lastname.

For example Santosh, Kumar

<Field ID="{DFD56BB9-1528-471A-824F-DCCEB90029A6}" Type="UserMulti" Name="PointOfContact" DisplayName="PointOfContact" Required="TRUE" UserSelectionMode="PeopleAndGroups" ShowField="Name" Mult="TRUE" Presence="TRUE"/>

3 Answers 3

1

How is your User Profile service configured? The Person column type saves something that looks like this:

23;#domain\username

Then SharePoint itself simply looks at your site collection, finds site user #23 (in this example), confirms that the username matches up, and then takes whatever info you've got there for their first and last name going forward. The site collection user list, in turn, just takes the information from your User Profile Service (there's a timer job that disseminates that info that runs hourly by default).

If you haven't set up User Profile Services, or if for some reason you aren't importing names, or if the login isn't on the list of imported items into UPS (for instance, if you've got multiple AD forests but are only pulling from a couple of them in UPS but you've configured your PeoplePicker via stsadm to pull from more), you might only see the login there. It's also possible that your site collection's entry for that login just didn't include the first and last name (for instance, if the user was added before you configured UPS).

Either way, if it's just one user you can always just edit the site collection user entry itself. If it's multiple people, I'm guessing that it's an issue with UPS.

1
  • John,Thanks for your detailed explanation. I have my Firstname,Lastname configured in AD. I want to set the ShowField option of the People picker to (NamewithPresence) Commented Aug 20, 2013 at 10:22
0

Go to your list using browser. On list settings, click your column. On "additional column settings" section, there is a combobox which shows the field to display.

1
  • Thanks i am creating the list from the list definition. I want to set it automatically any idea Commented Aug 6, 2013 at 14:09
0

Remove the "ShowField" parameter in your XML.

By default, ShowField goes to NameWithPresence.

You could also try to override its value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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