Show only first word of first name in search center

the users would like just the first word of the first name (whenever there are 2 or multiple first names) to show, not the second from the UPA in the search center site collection. Example: user's name is Doe,Mary-Anne and would like to show only Mary not Anne in search center.

Can I enter any formula for this?

September 2nd, 2015 10:52am

Hi HDragos,

For this issue, I recommend you modifying the item display template for people in SharePoint: Item_Person.html.

In the Item_Person.html. there is a div for displaying users name: <div id="NameField">.

You can extract the first word from the variable displayname and update the variable.

More about SharePoint search results display template:

http://blogs.technet.com/b/tothesharepoint/archive/2013/09/04/understand-how-search-results-are-displayed-in-sharepoint-server-2013.aspx

Best regards,

Victoria

Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2015 1:31am

Hi,

Check the following crawled and managed properties for Search and the setting for 'Searchable' should be set as 'No'. Also verify that this property is correctly mapped to the AD attribute.By Default in SharePoint it is mapped as follows.

Property name: First name 
Type:Text
Multi-valued:Yes
Queryable:Yes
Searchable:No
Mapped crawled properties: People:FirstName, People:SPS-PhoneticFirstName

Hope this helps :)

September 3rd, 2015 2:24am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics