AddToView in UpdateList

Forums SPJS-Utility AddToView in UpdateList

This topic contains 2 replies, has 2 voices, and was last updated by  Kessy Similien 1 year ago.

  • Author
    Posts
  • #11837

    Kessy Similien
    Participant

    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

    updateList()

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

  • #11866

    Alexander Bautz
    Keymaster

    Hi,
    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.

    Alexander

  • #11868

    Kessy Similien
    Participant

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

You must be logged in to reply to this topic.