Hot answers tagged spservices
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
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 ...
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
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 ...
5
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.
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
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
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 ...
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
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.
3
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 ...
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
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
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
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: ...
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.
2
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.
2
To detect concurrent edits SPPersitedObjects use an internal version number that is incremented on each successful write.
When you obtain a reference to an SPPersistedObject the version number at that time is remembered in your copy of the object.
When you make a change to your copy and try to .Update() it into the database SharePoint compares the version ...
2
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 ...
2
You dont have to make it hard to make it work.
Creating 2 lists with a lookup field will give you the storage solution you need.
Then you need to create views to show the info you need. For this you need the content query web part.
This is in sp 2007, but its exactly the same in 2010
Display data from multiple lists with the Content Query Web Part
2
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
2
Sorry for not getting back to you sooner. I was in training and then extremely ill the last 30ish hours.
Take a look at this post by Josh McCarty: http://joshmccarty.com/2011/11/sharepoint-jquery-and-fullcalendar%E2%80%94now-with-spservices/, wherein he followed some details I posted in this discussion on the SPServices codeplex site: ...
2
As always the answer is: It depends.
If your page only retrieves the data once and none of the queries takes a very long time, then you're generating the least load on the server (and have the least development) by just executing the queries on the server.
But if:
Some of the queries takes a long time
You're providing interaction with the data which may ...
2
There are a number of ways to handle this, and which is best depends on your situation and requirements. If you want to use the files farm-wide, and deploying to layouts is an option for you(some places it is frowned upon), then by all means put it in the layouts. The advantage here is that updates happen in one place, and also your users cannot ...
2
You have to roll your own, there isn't anything built in. The closest is a form operation, SPRequireUnique. You'd need to do a GetListItems operation to first see what's in the list, compare it to what you have and either skip it, update it, or add it.
Only top voted, non community-wiki answers of a minimum length are eligible