Monday, November 15, 2010

Update List Column Programmatically for SharePoint 2007

Two ways of doing this:

First one is via SharePoint object model:


SPList oList = oWeb.Lists["Technical"];
SPField myField = oList.Fields["Sub-tag"];
String schema = " xx ";
myField.SchemaXml = schema;
myField.Update();


the Second way is via Lists.asmx web service:

XmlNode listNode = mylistsrv.GetList("Technical");
string version = listNode.Attributes["Version"].Value;
string guid = listNode.Attributes["Name"].Value;

XmlDocument xmlDoc = new XmlDocument();
XmlElement updateFields = xmlDoc.CreateElement("Fields");

string fieldXml = "";

updateFields.InnerXml = fieldXml;
XmlNode result = mylistsrv.UpdateList(guid, null, null, updateFields, null, version);

No comments:

Elevating LLM Deployment with FastAPI and React: A Step-By-Step Guide

  In a   previous exploration , I delved into creating a Retrieval-Augmented-Generation (RAG) demo, utilising Google’s gemma model, Hugging ...