I needed to create a web part that simply output all information from an Announcements list. Sounds simple doesn’t it? But I came across a compiler error when using the “Created By” and “Modified By” columns. The error was telling me that the columns I am trying to read in my code do not exist.
After some Googling, I found out that SharePoint has something called “Internal Field Names”, whereby the display name of a column isn’t the actual column name. The full list of internal field names can be found at Michael Yeager's MSDN Blog.
If ever in doubt, you can find out the internal field names within SharePoint, by carrying out the following:
Go to your list and select “List Settings” from the ribbon.
Navigate to the where the list of columns are displayed and right click on the column in question. Select “Properties”.
- When the link property window opens, scroll to the end of the “Address: (URL)” section. You will find a query string parameter called “Field”. This query string parameter contains the real field name.
Confusing isn’t it? Well I guess it wouldn’t be SharePoint if the most simplest task failed to confuse a developer.
Before you go...
If you've found this post helpful, you can buy me a coffee. It's certainly not necessary but much appreciated!
Leave A Comment
If you have any questions or suggestions, feel free to leave a comment. I do get inundated with messages regarding my posts via LinkedIn and leaving a comment below is a better place to have an open discussion. Your comment will not only help others, but also myself.