Setting ‘Show field’ for “Person or Group” type column using PowerShell

Taken from https://prasadpathak.wordpress.com/2013/10/10/setting-show-field-for-person-or-group-type-column-using-powershell/

When using Person or Group field and you need to change how the field value is displayed change the show field value.

Bellow image shows the “show field” option on Edit column page.

Show_Field

<Field 
    Type="User" 
    DisplayName="My User Column" 
    List="UserInfo" 
    Required="FALSE" 
    ShowField="ImnName" 
    UserSelectionMode="1" 
    UserSelectionScope="0" 
    Group="Custom Columns" 
    ID="{}" 
    SourceID="{}" 
    StaticName="MyUserColumn" 
    Name="MyUserColumn" >
  </Field>
Below are all the show field values and these can be used to set column definition.
Sr.No. Show Field drop down options Exact value need to pass LookupField property
1 Name Title
2 Account Name
3 Work email EMail
4 Mobile phone MobilePhone
5 SIP Address SipAddress
6 Department Department
7 Title JobTitle
8 First name FirstName
9 Last name LastName
10 Work phone WorkPhone
11 User name UserName
12 Office Office
13 ID ID
14 Modified Modified
15 Created Created
16 Name (with presence) ImnName
17 Picture Only (36×36) PictureOnly_Size_36px
18 Picture Only (48×48) PictureOnly_Size_48px
19 Picture Only (72×72) PictureOnly_Size_72px
20 Name (with picture and details) NameWithPictureAndDetails
21 Content Type ContentTypeDisp

Taken from https://prasadpathak.wordpress.com/2013/10/10/setting-show-field-for-person-or-group-type-column-using-powershell/

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: