locked
Figuring out the internal field names RRS feed

  • Question

  • When I started, I was not aware that renaming a column did not change the internal name of the column.  Because of this, I have some columns where the internal name doesn't match the displayed name.  I know this will be a support problem later so I would like to locate them and document them.

    Is there a way to produce a view that shows the internal name and the display name so that I can compare them? 

    If not in a view, is there someplace I can look and do a 'stare and compare' ?

    I won't do this any more but I need to find the problems that I already have.


    tracy

    Tuesday, October 9, 2012 2:07 PM

Answers

  • The URL being appended with the * at the end was the problem I was trying to figure out.  I could recreate the problem with other views, so I knew it wasn't the view. 

    Anyway, i located the problem.

    The field is a lookup, and displayed in the view as a link, which is what I wanted.

    However, when I went and looked at the field itself, the value was the "FieldName"  - which seemed right at the time.  But when I changed the lookup value to select the "Fieldname(Linked to Item), that fixed the problem.

    I think I would have found this quickly if the view had not displayed the item as a link.  It showed it as a link, but the link just didn't work, due to the * at the end.  I still think that is pretty weird, since the URL is generated by SP in the view, not something that I created.

    In any event, it's working now.

    This has been a valuable learning experience, but less fun than most.

    Thanks to all who posted info. 


    tracy

    Thursday, October 11, 2012 1:23 PM

All replies


  • create simple console application which enumerates all SPWebs, then all SPLists in each web site and SPFields for each list, and write Title, InternalName and StaticName properties of each field. Also you may enumerate SPContentTypes instead of lists - it depends on how you use your fields (with or without content types).

    Blog - http://sadomovalex.blogspot.com
    CAML via C# - http://camlex.codeplex.com

    Tuesday, October 9, 2012 2:36 PM
  • Unfortunately, I don't think I can do that.  I have control over my site, but I cannot log into the server, I'm not a collection administrator.  Based on the info I found when searching, doing this requires a higher level of access than I have.

    I don't have that many lists; I am okay with checking them manually, since this is a one time event.  Is there someplace that I can see this? (Either in the browser or in Designer) 

    thanks


    tracy

    Tuesday, October 9, 2012 7:28 PM
  • Hi Tracy,

    You can check them manually by going to the list settings. From there, simply click on the name of the column to see that column/field's configuration. When you're there, take a look at your browser address bar. If I remember correctly, I believe the last part of the address will tell you what the internal name of that field is.


    Pman
    http://www.pmansLab.com/

    Wednesday, October 10, 2012 12:06 AM
  • Yes!

    That works.  

    It will take a little time to go through and do this, but since it's a one-time effort and I'm not in a rush that will be fine for my needs.

    I really wish I'd known this to begin with, but as far as I can tell, it isn't documented anywhere.

    Thank you for your help!

    tsf


    tracy

    Wednesday, October 10, 2012 1:17 PM
  • Ha ha, things seldom work out as planned. 

    I located the first field name with this issue.   I created a new field with a 'good' name and copied the data to that field.  The field is a lookup field.  The entries are valid.

    I used the browser to create a new view for the list, including the new field.   The info displays in the view but when I click on it from the view, it errors.  On investigation, I find that the error is caused because at the end of the url, it has appended the following:  &RootFolder=*

    ...cts/DispForm.aspx?ID=496&RootFolder=*

    If I remove everything the "&RootFolder=*", then the link works.  However, this isn't a link I'm constructing myself, I created a view via the browser and selected the field name by putting a checkmark in the box.   The view also include the "edit" icon, and if I click that, it does go where it should.  So, the only issue is in this one field, which is actually just a new field.

    The error given is the typical non-useful "Cannot complete this action" please try again.  There are not any work flows or actions in this site.  Just three lists.

    How do I prevent the undesired part from being added to the URL?


    tracy

    Wednesday, October 10, 2012 3:44 PM
  • There's at least six ways of finding the internal names. (and I'm sure there are more) 

    • From the browser
    • From SharePoint Designer
    • Using PowerShell
    • Using a C# Console Application
    • Using the Client Side Object Model
    • Using JavaScript Client Side Object Model and a Content Editor Web Part

    I dug though my notes and posted the steps here: http://techtrainingnotes.blogspot.com/2012/10/sharepointfinding-column-display-and.html


    Mike Smith TechTrainingNotes.blogspot.com

    Wednesday, October 10, 2012 4:07 PM
  • Hi tracy,

    Those parameters at the end of the url gets auto-generated. Aside from "RootFolder", there are other parameters that are useful(i.e. source). You'll find documentation on those online.

    By the way, your screenshot shows the value of RootFolder is just "*". That doesn't seem right. It should have the location/url to your list/library. 

    The view could be corrupted. Can you recreate this problem with other views or lists/libraries?


    Pman
    http://www.pmansLab.com/

    Thursday, October 11, 2012 12:32 AM
  • This is useful info Mike. Thanks for posting it.


    Pman
    http://www.pmansLab.com/

    Thursday, October 11, 2012 12:33 AM
  • The URL being appended with the * at the end was the problem I was trying to figure out.  I could recreate the problem with other views, so I knew it wasn't the view. 

    Anyway, i located the problem.

    The field is a lookup, and displayed in the view as a link, which is what I wanted.

    However, when I went and looked at the field itself, the value was the "FieldName"  - which seemed right at the time.  But when I changed the lookup value to select the "Fieldname(Linked to Item), that fixed the problem.

    I think I would have found this quickly if the view had not displayed the item as a link.  It showed it as a link, but the link just didn't work, due to the * at the end.  I still think that is pretty weird, since the URL is generated by SP in the view, not something that I created.

    In any event, it's working now.

    This has been a valuable learning experience, but less fun than most.

    Thanks to all who posted info. 


    tracy

    Thursday, October 11, 2012 1:23 PM