AddToView in UpdateList

Forums SPJS-Utility AddToView in UpdateList

This topic contains 2 replies, has 2 voices, and was last updated by  Kessy Similien 3 years, 4 months ago.

  • Author
  • #11837

    Kessy Similien

    If I’m using this to create new columns, what do I need to do to add those columns to the view. Right now the only way for me to do it is to change the

    addToView = true;

    flag in the


    function. Ideally I don’t want to change the source

  • #11866

    Alexander Bautz

    Sorry for not documenting these function better – many of them are only used “internally” in my solutions. Call the function like this:

    var uRes = spjs_UpdateList(_spPageContextInfo.pageListId,_spPageContextInfo.webServerRelativeUrl,[{'Type':'Text','DisplayName':'THE_FIELD_NAME','AddToView':true}],[]);

    “_spPageContextInfo.pageListId” is the current list GUID and the “_spPageContextInfo.webServerRelativeUrl” is the current list base url.


  • #11868

    Kessy Similien

    Ah I see, that’s simple enough, thanks!

You must be logged in to reply to this topic.