| | |
Retrieving data from a sharepoint list using CAML query - returning uneeded columns
Please support our XML, XSLT and XPATH advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2008
Posts: 41
Reputation:
Solved Threads: 0
Retrieving data from a sharepoint list using CAML query - returning uneeded columns
0
#1 33 Days Ago
hi, i am trying to retreive data from a sharepoint list but its returns all columns such as ows_MetaInfo, ows__ModerationStatus ,ows__Level ows_ID ,ows_owshiddenversion, ows_UniqueId ,ows_FSObjType
rather than just the fields i want from the list.
I thought the "<IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns> tag would filter these colums out
Can any1 help?
heres my code:
much appreciated
rather than just the fields i want from the list.
I thought the "<IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns> tag would filter these colums out
Can any1 help?
heres my code:
XML, XSLT and XPATH Syntax (Toggle Plain Text)
webreference.Lists myList = new webreference.Lists(); myList.Credentials = new NetworkCredential(Username, Password, Domain); // myList.Url = "http://193.82.85.1/HelpDesk/_vti_bin/lists.asmx"; XmlDocument xmlDoc = new XmlDocument(); XmlNode ndQuery = xmlDoc.CreateElement("Query"); XmlNode ndViewFields = xmlDoc.CreateElement("ViewFields"); XmlNode ndQueryOptions = xmlDoc.CreateElement("QueryOptions"); ndQueryOptions.InnerXml = "<IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns>" + "<DateInUtc>FALSE</DateInUtc>" + "<IncludeAttachmentUrls>TRUE</IncludeAttachmentUrls> <ViewAttributes Scope='Recursive' />"; ndViewFields.InnerXml = "<FieldRef Name='Title' /> <FieldRef Name='SRDetail'/> <FieldRef Name='Priority'/> <FieldRef Name='Raised_x0020_By'/> <FieldRef Name='Date_x0020_Raised'/> <FieldRef Name='Category'/> <FieldRef Name='Centre'/> <FieldRef Name='ResolutionType' />"; ndQuery.InnerXml = "<OrderBy><FieldRef Name='Date_x0020_Raised'/></OrderBy>"; //"<Query><Where><Eq><FieldRef Name='Raised_x0020_By' /><Value Type='Text'>ddlRaisedBy.Value</Value></Eq></Where></Query>" XmlNode nodeListItems = myList.GetListItems("{002DD75F-2F5A-407C-95A7-2C8CC7156C58}", "{3D3A5BB0-4994-4D64-891C-24D6ECB31991}", ndQuery, ndViewFields, "5", ndQueryOptions, null); XmlReader reader = new XmlNodeReader(nodeListItems); DataSet ds = new DataSet(); ds.ReadXml(reader); GridView1.DataSource = ds.Tables[1]; GridView1.DataBind();
much appreciated
Last edited by julseypart; 33 Days Ago at 7:52 am.
![]() |
Similar Threads
- Example of Inserting and Retrieving data from xml file (ASP.NET)
- Gridview coloumn data to come in Bulleted list (ASP.NET)
- Error while retrieving data from the drop down list (JSP)
- SQL Query Help... Searching one column in multiple tables? (MS Access and FileMaker Pro)
- inserting and retrieving data from a datarow in C# (C#)
- retrieving data from MySQL (PHP)
- Problem with retrieving data from access 2003 (Visual Basic 4 / 5 / 6)
- Table query returning error -- help! (MS SQL)
Other Threads in the XML, XSLT and XPATH Forum
- Previous Thread: XML Feed Problem with £ and ' any ideas.... anyone???
- Next Thread: Following XSLT Logic Not Working
| Thread Tools | Search this Thread |
api blogger blogging code delete development dynamiccreationofnvariablesinxslt error firstthreecharacterofastringrequired flipbook gdata google html include java link linspire linux microsoft news node openoffice overwrite precedence programming rss standards swf template transform variable w3c web xml xmlnotloading xmlonserver xsl xslt





