2

Using Powershell script i have change the Display name of Title column to New Request in Content Type.

I have use that content type in Custom list. When click on new item in list it will display New Request instead of Title.

But in default All items view it still display Title.

Is that possible to change All items view field "Title" display name?

  • You can use use SharePoint's Client Side Rendering Framework for changing the display name – Dikesh Gandhi Jun 6 '16 at 9:57
2

You can refer this blog to understand how to apply CSR.

The code which you can write to modify column names is as below (I am currently modifying "Title"):

(function () {


    function preTaskFormRenderer(renderCtx) {
       modifyColumns(renderCtx);       
    }


    function modifyColumns(renderCtx)
    {
      var arrayLength= renderCtx.ListSchema.Field.length;
        for (var i=0; i < arrayLength;i++)
        {
           if(renderCtx.ListSchema.Field[i].DisplayName == 'order_number')
             {
               var newTitle= "New Title";
               var linkTitleField = renderCtx.ListSchema.Field[i];
               linkTitleField.DisplayName = newTitle;
             }
         }
    }

    function registerRenderer()
    {
      var ctxForm = {};
      ctxForm.Templates = {};
      ctxForm.OnPreRender = preTaskFormRenderer;
      SPClientTemplates.TemplateManager.RegisterTemplateOverrides(ctxForm);
    } 
    ExecuteOrDelayUntilScriptLoaded(registerRenderer, 'clienttemplates.js');

})();

You can also for loop to find position of a particular field. var linkTitleField = renderCtx.ListSchema.Field[0]; Here "0" refers to the position of the field. As i mentioned above you can iterate over the fields to find the position of the desired column.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.