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:
- SPServices helper page: https://github.com/sympmarc/SPServices/blob/master/docs/core/web-services/Lists/GetListItems.md
- MS Help page - http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx
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.