Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [query]

A precise request for information retrieval with database and information systems.

13
votes
8answers
51k views

How to query Sharepoint 2010 lists with sql?

I think it has to be a common task. We have some applications on sharepoint and we need to prepare reports with data from these applications. It would be great if we could use Reporting Services. We ...
12
votes
2answers
33k views

Querying a simple list with a 'User' column, using CAML

I'm having some trouble getting a CAML Query working against a very simple list. My custom list has the fields: Person : User Date : Date Amount : Lookup My query looks like this: <Query> &...
12
votes
1answer
46k views

CAML Query, get item by lookup value, not by ID

I have the value of a lookup column, but I don't have the ID, I want to query items from SharePoint list using the lookup value. How do I achieve that in CAML?
10
votes
1answer
9k views

Is it possible to return only the count of the query?

Is there any way to return only the count of the rows from a Sharepoint query? I would like to get only the count of the result returned by sharepoint query.
10
votes
2answers
18k views

Get all Files from sub folder of a certain content type

my problem is I have a document library with sub folders. Also the document library got more than one content type. Is there a way to create a CAML or LINQ query to get all files of a certain content ...
6
votes
4answers
1k views

Soap + Rest: Trying to understand differences for selecting fields between the two

I'm working on a Java-Application that integrates with SharePoint. The different SharePoint services are currently requested via the SOAP API. I am now working on an abstraction layer to also ...
5
votes
4answers
12k views

Multiple Values in CAML query from Array? SharePoint 2010 using jQuery/SPServices

So if I use SPServices to GetListItems with CAMLQuery, is it possible to insert multiple values inside Value Type='Number'> here I would like to evaluate things throught a flow in my page, add to an ...
5
votes
3answers
6k views

How to query multiple document libraries?

I need to query multiple document libraries and get a particular item's ID by matching the queried barcode value. I need the ID to update the metadata for that item using web services. All the ...
5
votes
2answers
5k views

Querytext: blank value for a property

How could I specify in a Querytext that I want all the elements that doesn't have defined a value for a property? For example, let's say that I'm interested in the property CheckoutUserOWSUSER, how ...
5
votes
3answers
3k views

How to get visible SPField's for a specific list view

I am trying to enumerate a list based on a selected view - basically, programmatically doing what is visually shown when viewing a list. I will be using this to output a file, so I am first getting ...
5
votes
7answers
11k views

How to get the ID of a list item with a given GUID in Sharepoint online with REST api?

I tried a request at a url of the following form .../_api/web/Lists/getByTitle('docLib')/items?$select=id,GUID&$top=1&$filter=GUID eq '2779cf8051-381f-4834-93dc-ece6345dde33' and i get "...
5
votes
3answers
10k views

Page a list via A-Z

So I am trying to create an a to z directory from a list of items which should be an easy task and it is really, however, I am trying to find the most efficient way of doing it. So I was thinking use ...
5
votes
1answer
2k views

Difference between #k= and ?k= in the url

We have a custom JavaScript input box that passing the search term to the search result in a public SharePoint site. When a user log in to the site and search for stuff, everything works great. ...
5
votes
2answers
2k views

How to use SPServices search sql query - getting malformed query

I am using the SPServices javascript library to make a search request to sharepoint 2010 search. I am trying this query: queryText = "<QueryPacket xmlns='urn:Microsoft.Search.Query' Revision='1000'...
4
votes
2answers
629 views

People or Group field returning semicolon hash then Name

In querying the properties of a list item, I found that returning the value of a people or group field that the value would be returned in the form 1;#George Grainger Using the code: properties....
4
votes
1answer
6k views

KQL for date range

I've a managed property datetime and i try to use a search for having the result in range. The issue is that i don't know how to format the date myManageProperty=01/02/2014..17/02/2014 but i don't ...
4
votes
1answer
2k views

Error using javascript to retrieve a SharePoint list's items

I am trying to use this method to query items of a column of a list in my SP site via javascript (the reason I am doing this is to display that info on the page by modifying the html tags in the DOM), ...
4
votes
1answer
79 views

Site Search results are the same no matter the query

I am having trouble with the search in SharePoint 2013. The problem : I am running in to is that no matter what I search for in SharePoint, the results page populates that same exact documents in ...
4
votes
1answer
4k views

Errors executing bulk query when updating a Sharepoint Linked List from Access

I have a Sharepoint list that is a Linked List with MS Access (2010). It has just under 5,000 items (4,864), thus meaning it avoids the reduction in functionality lists of greater than 5,000 items ...
4
votes
2answers
93 views

Filter list with REST

I'm trying to filter a lookup column on my list using rest this is the column on my list it's a look up (connected to another list) and my rest on the list My query should get all the items that ...
4
votes
3answers
3k views

Jumping to a specific page within a SharePoint List

I was wondering what people think the best way is to jump to a specific page within a sharepoint list, taking into account performance considerations. eg: 1) List with 1000 items in it 2) Each page ...
4
votes
1answer
746 views

Exclude 'SharePoint' URL from Search results

We have several documents with 'SharePoint' in the title but our Online URL also has sharepoint (https://.sharepoint.com/). When users search for sharepoint, it returns all results because all ...
3
votes
4answers
1k views

What is the recommended way to query data on a Sharepoint site?

Say if I need to retrieve list items for batch processing, how would I be recommended to retrieve the data? Maybe Powershell or a SQL Server query?
3
votes
1answer
1k views

Filter Hyperlink field url using SharePoint REST API

I want to filter Hyperlink filed URL using REST API in SharePoint 2013. My URL is like below is working fine https://<siteurl>/_api/Web/Lists/GetByTitle('Pages')/items?$select=NavigateURL/Url ...
3
votes
2answers
461 views

Search Results WebPart: Result preview returns more results than actual

I am using the search results webpart to return a list of people in a particular department. I set up the query correctly for the webpart and when I do "Test Query", it returns 8 relevant results in ...
3
votes
1answer
3k views

Send current user's parameter to External Content Type

Is it possible to send the current user's username as a parameter for my External Content Type query? I am on SharePoint 2010 Standard.
3
votes
1answer
3k views

URL query with multiple wildcards

I have a list and I need to do a search on an item given two fields: topic and community. Both fields can have more than one item and they're both text field fields from an infopath form: For ...
3
votes
1answer
113 views

SP 2013 Search Results web part

I am trying to create an org chart based on a persons department. I am using the Search Results web part in SP 2013 Enterprise. When I build the query I select the "Local People Results (system). I ...
3
votes
2answers
1k views

Grabbing a filter value via CEWP code behind

I have employed a Query String Filter to parse a value and send it to a chart web part. now I would like to use this value in a CEWP to provide an explaination/clarification for the chart, but the ...
3
votes
1answer
340 views

How do I prioritize search results to show file names containing keyword appear first?

I have a document library in sharepoint online and I need to have the search results show any documents that have the searched keyword appear in the file name come up first in results, (i.e. if I have ...
3
votes
3answers
2k views

SharePoint Query Builder unknown error

On a SharePoint 2013 on-premises, we tried to install the August 2015 CU. However, the installation failed and since then, all Content Search web parts show an error if I try to change the query. The ...
3
votes
0answers
583 views

Sharepoint 2013 Search File Share result source exclusion

I'm using the query builder to try and get the results excluded containing the string "archive" The content source is a file share, not a web page. This is one of the hundred query transform ...
3
votes
2answers
201 views

View SQL Queries/times for page request

SharePoint 2010 has the fancy new developer dashboard where you can view the SQL queries made and how long they took to determine bottlenecks etc. I am not a SQL Sysadmin so I cannot use SQL profiler ...
2
votes
1answer
640 views

CAML query filtering is not working

I've googled that it can be in case when query is not well-formed. But I'm verifying it for several hours and didn't find any mistake. Problem is common: query doesn't filters and returns all data. ...
2
votes
1answer
2k views

sharepoint search boolean managed property

I have a managed property isActive which happens to be a Boolean. I am creating a search query and I only want the ones that are active so isActive:true however I am having trouble with the correct ...
2
votes
1answer
629 views

Rest API filter quote

I am using the SharePoint rest API, I need to quote a string in the filter query. This is my query: ?$filter=MyField eq 'aaa'aaa' How can I search the string " aaa'aaa "? Thanks
2
votes
2answers
82 views

Where can I find a list of fields that can be retrieved when running a sharepoint query?

An SPSiteDataQuery. So far I have: ... query.ViewFields = @"<FieldRef Name=""Title"" /><FieldRef Name=""Author"" />"; ... I just happened to get these two FieldRef's right (purely ...
2
votes
1answer
2k views

In a search display template, is there a search property available for the actual text (k=…) in Srch.U or any of the search objects?

I'm trying to add the searched text value to the query string in the url (<a href='...?searchText=[something]'>Title</a>) In the search display templates, I see ctx and Srch objects ...
2
votes
2answers
99 views

Query to a list doesn't work

I want to get the number of comments from the list "Comments" of a blog site. To do that, I have a query with this code: using (SPWeb oWebsite = oSiteCollection.OpenWeb(new Guid(WebId))) ...
2
votes
1answer
40 views

Importance of .Include in the query

Following this msdn page on SharePoint development I have encountered the following issue that I do not understand. Case scenario: We are trying to retrieve List of all visible Lists that are present ...
2
votes
1answer
6k views

How to use the Content Search Web Part to filter on a custom column property?

I am quite new to SharePoint 2013 and I have been working lately with the Content Search Web Part. However I haven't been able to make possible a filtering through a custom column that I have on a ...
2
votes
2answers
4k views

Querying against a note field with the REST API 2013

I'm getting the error The field 'OtherInfo' of type 'Note' cannot be used in the query filter expression whenever I run a query like this: http://devServer/majorMatter/_api/Web/Lists/GetByTitle(...
2
votes
1answer
113 views

Pnp : create a search query

I need a little remembering on pnp.search() queries. I know from a verified source that you can use either query text, SearchQuery Interface or SearchQuery Builder. No worries about that (except that ...
2
votes
1answer
150 views

Search for synonyms without a thesaurus file

We have a SP 2013 on prem site. I am a site collection admin and have no access to central admin. We have a site with a lot of human resource related content for non-HR managers. One thing they search ...
2
votes
1answer
150 views

Displaying an image from a SharePoint list using Javascript building strings

I have a JavaScript page querying a SharePoint list. It's displaying the results on a HTML page. Now I need to display an image for each item. I've uploaded an image to a Library called Device Images ...
2
votes
1answer
6k views

change display style for link column type in content query webpart

I have some questions about content query web part with sharepoint 2013 I use the content query to filter a list. This list has a column type link with some http links. when I display it with the ...
2
votes
1answer
361 views

QueryManager to find all documents modifed by current user

I'm creating a webpart which derives from Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart and the purpose of this webpart is to find all documents modified by current user. I've figured ...
2
votes
1answer
924 views

Filter query by site property

I have set a crawled property at the site level using $site.IndexPropertyKey.Add() and $site.Properties.Add() I set the value of that property to "somevalue" I full crawled. I mapped it to a managed ...
2
votes
1answer
238 views

Error while quering using search.asmx Query or ex query method

I am trying to query using search.asmx ex query and query methods using soap api's I am getting the following err "Data at the root level is invalid. Line 1, position 1." Please help . I am ...
2
votes
2answers
424 views

Sharepoint 2013 Check if path folder exists

I have a query like this: camlQuery.set_viewXml('<View Scope="RecursiveAll"><Query><Where> <In><FieldRef Name="FileDirRef" /> ...