Tag Info

New answers tagged

4

CAMLViewFields: '<ViewFields>'+ '<FieldRef Name="NamePage" />'+ '<FieldRef Name="Date" />'+ '<FieldRef Name="Title" />'+ '<ViewFields>' should be CAMLViewFields: '<ViewFields>'+ '<FieldRef Name="NamePage" />'+ '<FieldRef ...


3

The trick is to set the CAMLQueryOptions so that you get all the items regardless of what folder they are in. It's sort of like the "folderless" option in a view's settings. CAMLQueryOptions: "<QueryOptions><ViewAttributes Scope='RecursiveAll' /></QueryOptions>"; The GetListItems documentation on MSDN is a little light on these options. ...


0

Why can't you set the scope to recursive? Because of the amount of items you're retrieving or because it's not supported in CSOM (Not sure about this)? Have you tried filtering by a set amount. For example, retrieving the top 5000, then the next 5000, etc. Quick CAML Designer result: ClientContext clientContext = new ClientContext("your site"); ...


0

This error probably occurs due not sufficient permissions for a user in User Profile service application. How to configure permissions of User Profile service application: Go to Central Administration -> Manage service applications Select User Profile service and click Permissions button in Ribbon UI Specify the accounts that have access to invoke this ...


0

So upon your feedback try this one on. The divs will float and it will add a new div based on the category. You need to order items first by category. Then Display order. $(document).ready(function() { $().SPServices({ operation: "GetListItems", async: true, listName: "navigator", CAMLViewFields: "<ViewFields><FieldRef Name='Title' ...


2

It basically depends on your personal experience with the different technologies, there are many opinions out there with lots of pros and cons that may or may not be relevant to you. I personally very much dislike pure javascript CSOM because of all the context loading and SPServices was a good abstraction for that, but eversince I've used REST in SP2013 I ...


2

Pros A wide range of SharePoint functionality is exposed with the SOAP Web Services, much of which is not available in CSOM Allows anonymous access (assuming it is enabled for the underlying objects) Works cross-site and cross-domain, assuming that the authentication model you are using allows it Simpler syntax than the CSOM. Simply pass the required ...


1

Regarding grouping in SharePoint REST, according to Use OData query operations in SharePoint REST requests, Grouping is not supported. One of the solution, is to apply grouping for the JSON results returned from REST endpoint. Example Suppose the following function for getting list items via SharePoint REST API: function getListItems(url, listname, ...


0

Try switching to using single quotes on the attributes Source: Here var CamlQuery = "<Query><GroupBy Collapse='TRUE'><FieldRef Name='nameA' /></GroupBy></Query>"; var CamlViewFields="<ViewFields><FieldRef Name='nameA' /></ViewFields>";


4

You could perform this via CSOM/REST API. Use SP.Web.getFileByServerRelativeUrl Method to request File object and specify SP.File.listItemAllFields property to load list item field values for the list item corresponding to the file: var ctx = SP.ClientContext.get_current(); var file = ctx.get_web().getFileByServerRelativeUrl(url); //get file ...


0

First fetch the data using SharePoint REST List Api. Please check following link for that: How can I query for "AssignedTo = [ME]" using REST? Here use <QueryOptions> <ViewAttributes Scope='RecursiveAll' /> </QueryOptions> to get the data from the folder. After that use MERGE method to update data of a list Item. Check ...


2

I think you'd need to do it in 2 calls. First, you'd have to query your list with a GetListItems call with CAML query like: <ViewFields> <FieldRef Name='ID' /> </ViewFields> <Where> <Eq> <FieldRef Name='LinkFilename' /> <Value Type='Computed'>file.txt</Value> ...


0

http://akanoongo.blogspot.com/2011/02/how-to-resolve-2000-items-resolution-in.html has a PowerShell script which, when ran as farm admin, will increase the External Content Type row filter limt from 2,000 to 20,000. I tried it on our test/dev system, and it works.


0

Credit (much of this was derived from http://cecildt.blogspot.com/2010/10/upload-documents-to-sharepoint-2010.html - thanks Cecil!) SharePoint Steps In SharePoint, create a new document library with a metadata field - call the metadata field "CustomMetaData1". See implementation in method UploadFile below... Visual Studio Create console app in ...


0

You could consider the following options to determine the relative Url of the current Document Library: SP.ListOperation.Selection namespace Using SP.ListOperation.Selection.getSelectedList() Method you could get the ID of the list being selected: var currentListId = SP.ListOperation.Selection.getSelectedList(); and then retrieve List object or its ...


1

Get the list name using the variable ctx.ListTitle (reference: How to get List Name from JS Object Model - List Name from URL problem). Once you have the name of the current list, you can use the information from @tiago-duarte: How to find relative URL of a document library using CSOM Open up Chrome's Developer Tools and run "ctx" in the console. Inspect ...


1

It's really not an SPServices thing, per se, but a JavaScript/jQuery thing. Many functions give you callback values, and xData and Status are just examples of that. As Eric says, you can use any name you like, but most people seem to stick with xData and Status, as that's what I use in all of the examples. (I borrowed those names from somewhere else back in ...


0

If you are using _spPageContextInfo.userId, what are you using to get your other User values? You can make a REST call to https://{your site}/_api/GetUserById({id}) to grab the values. The alias should be a Title value?


1

You can always scrape it from the DOM if you need to. The exact code will depend on what version of SharePoint you are running. Open your favorite browser's developer tools, and search the DOM for your name. In this example, I'm using an Office 365 site: In this case my name is in a div with the ID of SuiteNavUserName, so the code would be... ...


3

xData represents the returned data, it could be replaced with foo or blah or whatever you'd like. Status represents the status of operation, off hand I don't remember if it is the status code (like 200) or status text (like success). I rarely use status and rely on the xdata returned in doing logic checking.


0

Have you tried using the webURL: option in you SPServices Call? Try adding that and put your sitecollection URL into this and see if it works. (Taken from the SPServices Documentation) $(document).ready(function() { $().SPServices({ operation: "GetGroupCollectionFromUser", userLoginName: $().SPServices.SPGetCurrentUser(), async: false, ...



Top 50 recent answers are included