Tag Info

New answers tagged

0

According to MSDN for SharePoint Server search, you specify the scope name in the WHERE clause, as follows: FROM Scope() WHERE "scope"='All Sites' So you select string have to be like this queryText += "SELECT Title, Rank, Size, Description, Write, Path FROM Scope() WHERE CONTAINS ('test') ORDER BY \"Rank\" DESC";


1

Default lookup query uses the value instead of lookup Id The typical query looks like <Query> <Where> <Eq> <FieldRef Name='RefCountry' /> <Value Type='Lookup'>India</Value> </Eq> </Where> </Query> To query by ID you have o setup LookupId='TRUE' ...


0

use clientContext.load(collListItems, 'Include(Title, Id)'); You need to explicitly set the properties you need to load of the list item collection. Source


0

I was approaching it the wrong way. Through force of habit, I was trying to get the list view involved to do the filtering, but I realized I can "roll my own view" and filter directly in the query with: <Query><Where><And><Neq><FieldRef Name='ID' /><Value Type='Number'></Value></Neq><Eq><FieldRef ...


1

Looks good, but you need to query on an ID if that's the parm you have. Also, remove the <View> tag from your query: <Query><Where><Neq><FieldRef Name='ID' /><Value Type='Counter'>" + id + "</Value></Neq></Where></Query> This will return all Items except the one with that ID. I'm not sure that ...


0

No, you cannot create a lookup field against a web property. If your skills in JS and Display Templates are up for it, you might already have access to web title and url in the ctx object. http://blogs.technet.com/b/sharepoint_quick_reads/archive/2013/09/03/3588171.aspx


0

Instead of if (thisList.Items.Count > 0) returnTable = thisList.Items.GetDataTable(); Use below code: SPQuery query = new SPQuery(); query.Query = "<Where><Eq><FieldRef Name=\"Enable\" /><Value Type=\"Boolean\">1</Value></Eq></Where>"; SPListItemCollection itemCol = list.GetItems(query); var ...


1

public static DataTable GetListData() { DataTable returnTable = null; SPSite thisSite = null; SPWeb thisWeb = null; SPList thisList = null; try { thisSite = new SPSite(siteLink); thisWeb = thisSite.OpenWeb(); thisList = thisWeb.Lists["Resources"]; SPQuery ...



Top 50 recent answers are included