Tag Info

Hot answers tagged

8

It is more a caml question than an SPServices question. Often one uses or and and operators to combine multiple values, which, like @rjcp3 said, can be messy. There is another operator, less known, IN operator to choose a range of values (see the xml example below). To simplify the creation of CAML queries in javascript, I'd recommend SharePoint ...


6

I very recently had the same issue with Nintex Workflow 2010: It wouldn't install properly from my App server because this service was turned off. Other than that, yes it's a good way to turn an application server into a true application server, and prevent it from running and serving the content web applications and IIS sites. Have a look at the ...


6

This blog post from Microsoft is highly linked to and describes what you want to do. I've used it before, these days I typically use jQuery and SPServices. Setting lookups typically requires you to pass in the Lookup ID value or the ID;Descriptor. Here's an actual example from a site of mine, it's setting a person/group field, not a lookup though. You ...


6

I had the same need and built my own jQuery widget... you can read more about it here: http://paultavares.wordpress.com/2012/04/28/sharepoint-ui-widgets-upload-and-pickusers/ The zip file has a self-contained demo that demonstrate the use of the upload plugin. Make sure you have all the prerequisites in place. Hope you find a good use for it. Paul.


6

You can use Sharepoint Client Object Model for this. Here is how to do it on the current web: function CheckPermissionOnWeb() { context = new SP.ClientContext.get_current(); web = context.get_web(); this._currentUser = web.get_currentUser(); context.load(this._currentUser); context.load(web,'EffectiveBasePermissions'); ...


5

Try this: $().SPServices({ operation: "GetUserLoginFromEmail", emailXml: "<Users><User Email='jack_harry@goodworld.net'/></Users>", completefunc: function (xData, Status) { $(xData.responseXML).find("User").each(function() { $(this).attr("DisplayName"); }) } });


5

Use get_id to get the GUID var value = SP.Web.get_id(); Example usage: <script type="text/javascript"> ExecuteOrDelayUntilScriptLoaded(getSite, "sp.js"); var context = null; var web = null; function getSite() { context = new SP.ClientContext.get_current(); web = context.get_web(); context.load(web); ...


4

Have you ever used SPServices? This will allow you to do these calls without writing the soap stuff yourself. I use it and if for example I am populating a dropdown, I will sort the return and iterate using the jQuery each option and then check to see if it is unique by testing it against the last option in the iteration.


4

My advice would be to use the CDATA escape, rather than replacing the offending characters one by one: <Query><Where><Eq><FieldRef Name="Title" /><Value Type="Text"><![CDATA[Value < 10]]></Value></Eq></Where></Query> That should cure most XML special character ills.


4

Leave it on, as it provides flexibility. You should already be directing traffic to your WFEs with DNS or a load balancer, so other servers won't have traffic hitting them. But leave it on. Down the road you'll need to perform some sort of troubleshooting, and this will come in handy. "Well, then turn it on when you need to!" I hear you say. The problem ...


4

Finally got it working after some changes in IIS under authentication section for "_vti_bin" directory. Set "Anonymous Authentication" to Disabled and "Basic Authentication" to "Enabled". For time being this setting worked for me; not sure whether this is going to work every time.


4

There is no such thing as read vs. write access when securing a URL to a web service - You can reference the Web Service URL or you can't. The services themselves are implemented to enforce security just as if you were logged into the site through the browser. Without access to _vti_bin you are pretty much out of luck for any of the SharePoint Web Service ...


4

In order to return account name, email, and name instead of just the name, use: CAMLQueryOptions: "<QueryOptions><ExpandUserField>True</ExpandUserField></QueryOptions>" Refer SPServices GetListItems documentation for more details. Example: $().SPServices({ operation: "GetListItems", async: false, ...


3

Follow these steps: Create another view and change the default view to this view Set permissions for the list from List Settings as 'Limited Contribute - default view' for all users except admin. Edit: 3. Go to Site settings -> Permissions -> Permission levels and create a permission for only viewing the default view. If this does not help: Open the ...


3

You need to convert the special characters, see an example of code here: https://devspoint.wordpress.com/2011/01/07/two-quick-javascript-snippets-i-use-everyday/#comments SharePoint actually has a built-in function for that, called STSHtmlEncode (cf. my comment in the above link).


3

I see this is a bit of an old question, but it is unanswered so I'll offer a solution... I have had issues getting the web service calls to work across domains. The issue for me has always been that the SPServices library should reside on the same domain that you're making the web service call to. Symptomatically, I've generally seen a fairly nondescript ...


3

You need to use the Users and Groups web service. If you call the GetUserCollectionFromWeb() method, it will return an XML node containing all the users on the site. You can then look up your specific user using the ID returned in your User node - in the case of the example - 43. The web service will return a collection of User nodes which have an ID ...


3

I believe that you are looking for this: $().SPServices({ operation: "GetVersionCollection", async: false, strlistID: "tester", strlistItemID: 1, strFieldName: "Information", completefunc: function (xData, Status) { $(xData.responseText).find("Version").each(function(i) { console.log("Name: " + $(this).attr("Information") + " ...


3

You can call the User Profile Service with each account returned by search. Each Web Service focuses on different tasks and subsets of data and many times you must combine them to build applications. Also consider using my SPServices jQuery library to make things easier. http://SPServices.codeplex.com


3

First off, you can use $().SPServices.SPGetQueryString rather than rolling your own Query String parser. Secondly, you should be able to just set the simple select and not worry about the hidden complex select. The $().SPServices.SPComplexToSimpleDropdown function takes care of updating the complex select under the covers. Finally, you shouldn't need any ...


3

You see everything because you have the highest privledges available to you as being a site collection admin. You will see everything regardless if you do not have permissions because web serivces execute under the permissions of the current user. Regular users do not have that luxury. I gave another user account full control permissions o my site and ...


3

I tested your code. It is working. Are the column names right: Title and Message? Before you test this code with a custom list, try a standard list, like Posts (in Office 365), or Announcements: function CreateNewItem(subject, message) { $().SPServices({ operation: "UpdateListItems", async: false, batchCmd: "New", ...


3

I think you are talking about the Jquery SPServices library, you should start by reading the spservices documentation here: http://spservices.codeplex.com/documentation I'll give you a code sample, but to get this really working you need to read the documentation. function GetEvents() { $().SPServices({ debug: true, operation: ...


3

Have you considered something like this? $().SPServices({ operation: "Query", queryXml: queryText, completefunc: function(xdata, status){ //code to set your variables searchComplete(xdata, status, yourVariables); } }); function searchComplete(xdata, status, yourVariables) { }


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

In order to pull that off in a CEWP, you are going to have to use some combination of AJAX and/or jQuery with the SharePoint Web Services. It's a lot of work. A couple of references related to the search web service: http://msdn.microsoft.com/en-us/library/ms543175(v=office.12).aspx http://www.mosssearch.com/searchwebservice.html


2

You could do this fairly easily using SPUtility.js (full disclosure this is a library I maintain). You would probably put it all inside a Content Editor Web Part on the NewForm.aspx. You would have your "advanced mode" link that would toggle showing/hiding the fields. Example using SPUtility.js: SPUtility.GetSPField('Field A').Hide(); // or Show() after ...


2

there. If you are using jQuery and the Web Services (hopefully with my SPServices library!), you have to do the two step process. Call GetListItems with your CAMLQuery first to get the items you need to work with and then call UpdateListItems to make the changes. This isn't my design, by the way, it's just the way the SharePoint Lists Web Service works. ...


2

You could solve it with a working crossbrowser solution by replacing your string from: $(xData.responseXML).find("[nodeName=z:row]").each(function() to: $(xData.responseXML).find("z\\:row, row").each(function() and then it will work in all browsers ;)


2

To see if an item exists in the list, you can look at the $(xData.responseXML).find("[nodeName=rs:data]").attr("ItemCount"); output of the getlistitems operation. We sort of hashed out something similar on stump the panel.



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