Show internal names of SharePoint List fields in List Settings page

This works only in chrome and you need tapermonkey extension for this to work.

Create a new script in tapermonkey with the below script –

// ==UserScript==
// @name         Internal Names
// @namespace    https://spuser.wordpress.com/
// @require      http://code.jquery.com/jquery-latest.js
// @version      0.1
// @description  try to take over the world!
// @author       You
// @include        */_layouts/15/listedit.aspx?*
// @grant        none
// ==/UserScript==
/* jshint -W097 */
'use strict';

// Your code here...
$(document).ready(function(){
    var counter = 0;
    $('table[summary]:last tr').each(function(){ 
        if(counter == 0){
            var th = '<th class="ms-vh2-nofilter">Internal Name</th>';
            $(this).append($(th));
            counter++;
        }
        else{
            var anchor = $(this).find('td').first().children('a');
            var internalName = $(unescape(anchor.attr('href')).split('Field=')).last()[0]
            var clone = $(anchor).clone();
            debugger;
            $(clone).text(internalName);
            td = '<td class="ms-vb2">' + $(clone)[0].outerHTML + '</td>';
            $(this).append($(td));
        }
    });
});

The above code adds a new column in the list columns table.

Advertisements