Hot answers tagged

2

Without fully knowing your list data structure, I'm thinking your query string should be formatted along the lines of : <Where> <Or> <Contains> <FieldRef Name='SeriousHarmQ1' /> <Value Type='MultiChoice'>Loss of consciousness</Value> </Contains> ...


2

I don't think there's a way to tell the edit form to automatically open the first item per se, but if you had the time you could create a page with a PageViewer web part that links to the edit form and then write some JavaScript code to look up the list through the CSOM, determine what the lowest ID is, and then replace the ID portion of the query string ...


2

Instead of SPList you should use SPPictureLibrary. I mean SPList picLibCity = (SPPictureLibrary) spWeb.Lists["City"]; And instead of ImageURL, you should use ServerUrl. I mean foreach (var row in EmpList) { if (row.City!= null) { string group = row.city; SPItem lookupItem = picLibCity.GetItemById(group.LookupId); string ...


1

Do I have to call executeQueryAsync twice? Once to get the list items and the 2nd to act on all of them? Yes. Your first query gets the list of items (declare them in the parent scope, obviously, so that they are accessible on the success callback), and in the function of success callback, you can iterate through them to fire individual queries to modify ...


1

I can think of three ways in which this code has gone wrong. The long URL that you are mentioning is actually a view inside a site collection which is not the root site collection. Meaning that you are trying to access a the root site collection instead of the actual site collection. The easiest way of knowing this would be to check if there is a "sites" ...


1

You can delete it with the help of SharePoint Designer Open site Goto All files Select list folder Select your list There you'll have the view page Delete the page And voila you are done.


1

By using code from How to build a CAML query with several nested OR's using a loop and its answser http://sharepoint.stackexchange.com/a/167266/35604, you can easily simplify your code. Now you have all these methods that help you building nested Or and And queries, simply do this: List<string> queries = new List<string>(); if ...


1

The icon URL is: http://your-sharepoint-url/_layouts/15/images/ For example: http://your-sharepoint-url/_layouts/15/images/icdocx.png


1

For us it was some columns are indexed twice. So we created index for: Column A, Column B, Column A + B By removing the third index we solved this issue. Pretty hard to understand why Ms even allow the combination in this case.


1

Turns out the Managed Property mapped to my Crawled Property for this column had an unchecked "Searchable" box. Checked it, ran a full crawl, and now the list search is working like a charm. #themoreyouknow!



Only top voted, non community-wiki answers of a minimum length are eligible