{"id":4572,"date":"2019-02-08T09:27:23","date_gmt":"2019-02-08T14:27:23","guid":{"rendered":"http:\/\/lisa.rushworth.us\/?p=4572"},"modified":"2019-02-08T09:27:23","modified_gmt":"2019-02-08T14:27:23","slug":"sharepoint-column-naming-inconsistency","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=4572","title":{"rendered":"SharePoint Column Naming Inconsistency"},"content":{"rendered":"<p>I have been interfacing with SharePoint list data via the REST API and assumed the name I typed onto the column was, well, the column\u2019s name. It\u2019s not!<\/p>\n<p>In the \u2018normal\u2019 view, click \u2018Add column\u2019 and add a column.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1657\" height=\"715\" class=\"wp-image-4573\" src=\"http:\/\/lisa.rushworth.us\/wp-content\/uploads\/2019\/02\/word-image-19.png\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/02\/word-image-19.png 1657w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/02\/word-image-19-300x129.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/02\/word-image-19-768x331.png 768w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/02\/word-image-19-1024x442.png 1024w\" sizes=\"auto, (max-width: 1657px) 100vw, 1657px\" \/><\/p>\n<p>Switch to \u201cQuick edit\u201d view.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"817\" height=\"247\" class=\"wp-image-4574\" src=\"http:\/\/lisa.rushworth.us\/wp-content\/uploads\/2019\/02\/word-image-20.png\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/02\/word-image-20.png 817w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/02\/word-image-20-300x91.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/02\/word-image-20-768x232.png 768w\" sizes=\"auto, (max-width: 817px) 100vw, 817px\" \/><\/p>\n<p>Add a column using the \u201c+\u201d symbol.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"909\" height=\"482\" class=\"wp-image-4575\" src=\"http:\/\/lisa.rushworth.us\/wp-content\/uploads\/2019\/02\/word-image-21.png\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/02\/word-image-21.png 909w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/02\/word-image-21-300x159.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/02\/word-image-21-768x407.png 768w\" sizes=\"auto, (max-width: 909px) 100vw, 909px\" \/><\/p>\n<p>What do we have? The columns <em>look<\/em> like they have the names I\u2019ve supplied through either method. But \u2026 hover your mouse over the column and check out the URL for the column.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"919\" height=\"401\" class=\"wp-image-4576\" src=\"http:\/\/lisa.rushworth.us\/wp-content\/uploads\/2019\/02\/word-image-22.png\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/02\/word-image-22.png 919w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/02\/word-image-22-300x131.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/02\/word-image-22-768x335.png 768w\" sizes=\"auto, (max-width: 919px) 100vw, 919px\" \/><\/p>\n<p>While the ones added using \u201cAdd Column\u201d are named exactly what I typed, the ones added in quick edit have four-character pseudo-random strings instead of the name I typed.<\/p>\n<p>https:\/\/tenant.sharepoint.com\/sites\/SiteName\/_layouts\/15\/FldEdit.aspx?List=%2MZQ472C3%2F5P5D%2M3M4%2P9T5%2DJ3K5CE52M9I1%7D&amp;Field=<strong>AddedViaAddColumn<\/strong><\/p>\n<p>https:\/\/tenant.sharepoint.com\/sites\/SiteName\/_layouts\/15\/FldEdit.aspx?List=%9MZQ472C3%9F5P5D%2M3M4%2P9T5%2DJ3K5CE52M9I1%7D&amp;Field=<strong>dwev<\/strong><\/p>\n<p>https:\/\/tenant.sharepoint.com\/sites\/SiteName\/_layouts\/15\/FldEdit.aspx?List=%9MZQ472C3%9F5P5D%2M3M4%2P9T5%2DJ3K5CE52M9I1%7D&amp;Field=<strong>fqkm<\/strong><\/p>\n<p>https:\/\/tenant.sharepoint.com\/sites\/SiteName\/_layouts\/15\/FldEdit.aspx?List=%9MZQ472C3%9F5P5D%2M3M4%2P9T5%2DJ3K5CE52M9I1%7D&amp;Field=<strong>NumberViaAddColumn<\/strong><\/p>\n<p>For GUI access to your data, this is immaterial \u2013 the friendly name displays on forms; but, when you are accessing data via the REST API, you must use the internal field name and not the display name you <em>think<\/em> is assigned to the column. It took me a <em>long<\/em> time to figure out why my REST call kept saying there was no field \u201cuid\u201d when I could <em>clearly<\/em> see a column with that name in my list.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have been interfacing with SharePoint list data via the REST API and assumed the name I typed onto the column was, well, the column\u2019s name. It\u2019s not! In the \u2018normal\u2019 view, click \u2018Add column\u2019 and add a column. Switch to \u201cQuick edit\u201d view. Add a column using the \u201c+\u201d symbol. What do we have? &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,677],"tags":[415,747,750],"class_list":["post-4572","post","type-post","status-publish","format-standard","hentry","category-coding","category-office-365","tag-sharepoint","tag-sharepoint-online","tag-sharepoint-rest-api"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/4572","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4572"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/4572\/revisions"}],"predecessor-version":[{"id":4577,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/4572\/revisions\/4577"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}