Tag Info

Hot answers tagged

3

Since you mentioned SPServices, below is demonstrated how to query list item by file name using GetListItems operation: function fileExists(webUrl,listName,fileName,result) { $().SPServices({ operation: "GetListItems", webURL: webUrl, listName: listName, CAMLQuery: "<Query><Where><Eq><FieldRef ...


2

Without knowing more information about your code, it's hard to make a suggestion. But what I would do is create a query to ListData.svc with the following filter: var queryString = "?$filter=Name eq '" + provisdionalName + "'"; var listUrl = "_vti_bin/Listdata.svc/YourList/$count" + queryString; $.ajax({ type: "GET", url: ...


2

I would recommend that you have a look at SPServices. They have a method that fits your need http://spservices.codeplex.com/wikipage?title=%24().SPServices.SPFindPeoplePicker


2

The usage of jQuery document.ready in SharePoint isn't enough to guarantee that the page has been fully loaded. In place of the document.ready function, it's suggested that you use the native _spBodyOnLoadFunctionNames array, like in the following code snippet: _spBodyOnLoadFunctionNames.push("callMeWhenReady"); function callMeWhenReady(){ // your code ...


2

Here's something that will get you started. function GetKeywordFromUrl() { var hashValue = window.location.hash; if (hashValue) { var k = hashValue.split('#k=')[1]; if (k) return decodeURIComponent(k.replace(/\+/g, " ")); //For executing keyword/filter search from a textbox var txtSearch = ...


1

Is the stuff with promises important? If not why not just use 'Include(AllProperties)' to include the properties and do something like this: var context = SP.ClientContext.get_current(); var webs = context.get_site().get_rootWeb().get_webs(); context.load(webs, 'Include(AllProperties)'); context.executeQueryAsync(function(){ var enumerator = ...


1

Should your query type be STRING and not MSSQLFT (SQL Syntax is deprecated). I assume you are using SharePoint 2010. For the KQL, change the query to something like write:02/27/2014..05/27/2014 or write>02/27/2014 AND write<05/27/2014 (either should work). Did you know you can also use cool variables like write:"last month" according to Michael ...


1

Have you tried something like this? <Query> <Where> <Eq> <FieldRef Name='ID' /> <Value Type='Number'>{YourIdGoesHere}</Value> </Eq> </Where> <OrderBy><FieldRef Name='FileLeafRef' /></OrderBy> </Query> <ViewFields> <FieldRef Name='ID' ...


1

What I have working is the following: Method POST URL http://www.somewhere.com/testsite/_api/web/GetFolderByServerRelativeUrl('/testsite/Shared Documents')/Files/add(url='filename.png',overwrite=true) Header Content-Type: application/octet-stream Accept: application/json;odata=verbose X-RequestDigest: ... Body Raw binary bytes (no JSON) Then in ...



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