AddToView in UpdateList
- This topic has 2 replies, 2 voices, and was last updated 10 years, 5 months ago by .
Viewing 2 reply threads
Viewing 2 reply threads
- You must be logged in to reply to this topic.
Home › Forums › SPJS-Utility › AddToView in UpdateList
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
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
Ah I see, that’s simple enough, thanks!