Related Items field display names

rss

Posted by Sonoma - Feb 6 ’15 at 12:14

Hi.

Is there is way to display a Related Items title/display name differently?

 

e.g.

Title -> Main Tile

DRUG -> Drug

Column1 -> Column Name

Column2 - > Field Two

 

I tried modifying the View XML but nothing changed. I tried DisplayName="New Name" and Title="New Name" as discribed here https://msdn.microsoft.com/en-us/library/office/ms437580(v=office.15).aspx.

These did not work.

Any suggestions?

 

Thank you.

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 20 days
    #1 by Dmitry Kozlov Feb 9 ’15 at 03:48

    Hi,

    You can change titles in the settings of the original list. Or do you need different titles in different views?

  • Sonoma
    Member
    Member for: 5 years 2 months 17 days
    #2 by Sonoma Feb 9 ’15 at 08:41

    [#1]: Since our data statisticians pull the data into SAS they prefer the column names to be a certain way. Short, no spaces.

    Users can't decipher all the columns. SAS people live in code.

    They enjoy making simple difficult.

    e.g.

    Chart 1 -> MC1

    Column 99 -> TC99

     

    I do my best to help both worlds.

     

  • Sonoma
    Member
    Member for: 5 years 2 months 17 days
    #3 by Sonoma Feb 9 ’15 at 10:11

    [#1]: Thinking more on it this maybe the way to go since the internal name should remain the same. Thanks.

  • Sonoma
    Member
    Member for: 5 years 2 months 17 days
    #4 by Sonoma Feb 9 ’15 at 10:57

    [#3]: Ignore my last post. When I export the list to excel or csv it exprts the friendly name.

     

    e.g

    I changed DRUG to Drug Name and changed STUDY to Study Name.

    These columns exported to csv as the friendly name Study Name and Drug Name and not the internal name.

    I will keep trying til I find a simple solution. Thanks.

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 20 days
    #5 by Dmitry Kozlov Feb 10 ’15 at 04:26

    [#4]: Hi,

    You can export list data with the help of PowerShell script and insert internal names of fields instead of titles into column headers:

    http://porchcode.blogspot.ru/2013/04/exporting-sharepoint-list-items-to-csv.html

    Replace

    $hash.add($fld.Title, $_[$fld.Title])

    with

    $hash.add($fld.InternalName, $_[$fld.Title])

  • Sonoma
    Member
    Member for: 5 years 2 months 17 days
    #6 by Sonoma Feb 10 ’15 at 10:14

    [#5]: Thank you. This is a good solution.It exports fine. I will tweak it to export just the list the user is requesting.

    If anyone uses this I needed to use these lines to the beginning of the script.

    Add-PSSnapin Microsoft.Sharepoint.Powershell
    Set-ExecutionPolicy -ExecutionPolicy "Unrestricted" -Force

     

    However I did notice a quirk when renaming the fields. I was able to repeat it.

    I changed a field name from DTEND to "Date End". Works as it should. But it renames the internal name to "xqkb".

    another column internal name changed from DTSTART changed to "FLM2"

    They export as these aswel. Is this common SP behavior?

     

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 20 days
    #7 by Dmitry Kozlov Feb 11 ’15 at 06:38

    [#6]: Hi,

    I've never encountered such behaviour. As I know, internal names never change since the fields was created.

Displaying 1 to 7 of 7 messages