sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Internal names acces does not use x0020

Open Biggum82 opened this issue 5 years ago • 3 comments

Hello. I'm following these series of articles to pratice due to some future project I'm planning to do. I think they are very useful.

In this example is used a replacement for sapces using text "x0020" to acces the List Column. And it is quite well explained. This is not working.

The actual method that works is just erase spaces and concatenate all caracters in a string. In the example, the resulting string for "Added to Corporate DB" field is "AddedtoCorporateDB".

I have found this solution googling around, not in MS Docs.

1 Open the List Settings page 2 Under the Columns section, select a column to view the Edit Column page 3 The URL of this page includes the internal name in the query string. For example, the URL for the "Added to Corporate DB" field includes the following:

https://{URL_TENANT}/sites/{developer_site}/hongkong/_layouts/15/FldEdit.aspx?List=%7BED420F68%2DEA01%2D40D8%2DBDDD%2D44923AB1E4BE%7D&Field=AddedtoCorporateDB

The value for the Field parameter, AddedtoCorporateDB at the end of the URL, is the internal name for Created By.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Biggum82 avatar Jun 01 '21 07:06 Biggum82

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Jun 01 '21 07:06 ghost

A brief history, SharePoint classic would always replace spaces with x0020 in your internal column names. However, this is not always the case, especially in Modern, where you can create columns on the list view itself, and it will not do this, it will just concatenate the values like you see here.

So while in some scenarios, it will not add the x0020 , there are still many cases where it will depending on how the column is created... so this document is still valid.

Long story short, whenever working with the SharePoint programatically, it's always best to confirm the internal value of the column like you did.

bcameron1231 avatar Jun 01 '21 13:06 bcameron1231

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

ghost avatar Jun 09 '21 00:06 ghost