Tag Info

New answers tagged

0

You can by using SPServices, for full tutorial please visit http://sharepointkids.blogspot.in/2014/04/two-level-cascading-drop-down-in.html


1

I think you will have to try another way. SPCascadeDropdowns can use a CAML Query, but a CAML Query can not return the unique items the way you want. There are a number of options discussed on the SPServices Discussion Forums for getting unique items from a list. I like Frederik's option of returning the HTML for a dropdown from the filter.aspx $.ajax({ ...


0

Well, adding the code below as a new function to the SPServices.js file, will work. The new function name is SPGetLastItemIdAnyUser : // Function to return the ID of the last item created on a list. $.fn.SPServices.SPGetLastItemIdAnyUser = function(options) { var opt = $.extend({}, { webURL: "", // URL of the target Web. If not ...


0

Copy does just that, does a one for one copy from the source to the destination. After the copy succeeds, I'd make another SPServices call using UpdateListItems to blank out the fields you don't need populated.


0

You can use a deferred with a resolve for your return value that is populated during async execution. After that you return a promise that you catch in a done method on function calling (check jQuery documentation: http://api.jquery.com/deferred.promise/): functionToCall().done(function (returnedValue) { // do something with the returned value }); ...


1

Since SPServices.SPGetCurrentUser() function returns an associative array where the keys are mapped to fieldNames you could access it as: var name = thisUserValues.Name; or var name = thisUserValues['Name'];


0

You should be able to get the individual values with the following: var name = thisUsersValues["Name"]; var ID = thisUsersValues["ID"]; var SIPAddress = thisUsersValues["SIP Address"];


1

Instead of using fieldNames, just use fieldname. $().SPServices.SPGetCurrentUser({ fieldName: "Name", debug: false }); Or using your current function it'd be this I believe: var thisUsersValues = $().SPServices.SPGetCurrentUser({ fieldNames: ["ID", "Name", "SIP Address"], debug: false }); var name = thisUsersValues[1];


0

If the cascade stopped working after a SharePoint upgrade, check out this blog post: http://sympmarc.com/2014/01/23/office-365-update-changes-display-name-on-required-fields/ I would also suggest to try out this solution for Cascading Selects (disclaimer: I am the author).


0

Have you tried to increase the list threshhold to higher value? The work around is to "Override the list view threshold for an individual list by setting the SPList.EnableThrottling property to false. private static void DisbaleListThrottling() { using (SPSite spSite = new SPSite("http://YourSiteNameHere.com/TeamSite/")) { ...


1

Your CAMLQuery: "<Where><Eq><FieldRef Name='Employee' /><Value Type='Lookup'>" + thisUserAccount + "</Value></Eq></Where>" should have "<Query>" tags: CAMLQuery: "<Query><Where><Eq><FieldRef Name='Employee' /><Value Type='Lookup'>" + thisUserAccount + ...


0

The following example demonstrates how to retrieve an additional information about selected items: function getSelectedItems(success,error) { var context = SP.ClientContext.get_current(); var listId = SP.ListOperation.Selection.getSelectedList(); //selected list Id var selectedItemIds = SP.ListOperation.Selection.getSelectedItems(context); ...


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: ...


0

You don't necessarily have to call Caml Query inside loop to get the FileLeafRef here since you already know the IDs of the Documents. You can use SP.List.getItemById(id) method.Please see below code to give you an idea of how to start with: items = []; function getSetListItem() { var clientContext = SP.ClientContext.get_current(); ...


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' ...


0

You could query User Information List to retrieve User details. How to get user information using SharePoint Web Services (SPServices) function getUserInfo(userId,result) { $().SPServices({ operation: "GetListItems", listName: "User Information List", CAMLQuery: "<Query><Where><Eq><FieldRef Name='ID' /><Value ...


1

2013 SP.Web.getUserById() http://msdn.microsoft.com/en-us/library/office/jj247179(v=office.15).aspx or spservices GetUserProfileByGuid and GetUserProfileByIndex should work http://spservices.codeplex.com/wikipage?title=UserProfileService and another solution http://spservices.codeplex.com/discussions/262196 $.ajax({ url: ...


1

The following example demonstrates how to add error handling for CopyIntoItems operation in SPServices: completefunc: function(xData, Status) { var errorCode = $(xData.responseXML).find('CopyResult').attr('ErrorCode'); if (errorCode == "Unknown") { var errorMessage = $(xData.responseXML).find('CopyResult').attr('ErrorMessage'); ...



Top 50 recent answers are included