sympmarc / SPServices

SPServices is a jQuery library which abstracts SharePoint's Web Services and makes them easier to use. It also includes functions which use the various Web Service operations to provide more useful (and cool) capabilities. It works entirely client side and requires no server install.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

use <Method> in SPServices

FarshadRanaei opened this issue · comments

I can't find any solution to write query like this in SPServices:
<View> <Method Name="<The name of the Read List method which we edited to add the Filter>"> <Filter Name="<The name of the Filter>" Value='{0}'/> </Method> <Query> <Where> <Eq> <FieldRef Name='<Name of the Filter Field>' /> <Value Type='Number'>{0}</Value> </Eq> </Where> </Query> </View>

That doesn't look like valid CAML to the SOAP (asmx) services.

It's a valid caml.
I implemented in csom but i can't use it in SPServices.

Thanks Paul
I want to get query from external list with specific parameter and i use csom like this:
"<Method Name='GetItems'>"+ "<Filter Name='factorNumber' Value='"+Id+"'/>"+ "</Method>"+ "<Query>"+ "</Query>"+ "<ViewFields>"+ "<FieldRef Name='SendAmount'/>"+ "</ViewFields>"+ "</View>"
which "GetItems" is my conection and "factorNumber" is filter that i get query based on that.

You need to build it as a SOAP request (XML) and I think the method that needs to be used is the GetListItems... Here are some links that might help you:

If you happen to respond back to this thread - Please include your JS code that shows your setup to the SPServices $().SPServices({ operation: "GetListItems", CAMLQuery: "???" ... }) method. Its important that we see how you are actually settting the call along with your query.