Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: CAML Query Help

$
0
0
I have this query:
CAMLQuery: "<Query>" +
"<OrderBy>" +
    "<FieldRef Name='ID' Ascending='FALSE'></FieldRef>" +
"</OrderBy>" +
"<Where>" +
    "<And>" +
        "<And>" +
            "<Contains>" +
                "<FieldRef Name='Column1' /><Value Type='Text'>" + newval + "</Value>" +
            "</Contains>" +
            "<Neq>" +
                "<FieldRef Name='Title' /><Value Type='Text'>" + curTitle + "</Value>" +
            "</Neq>" +
        "</And>" +
        "<Or>" +
            "<Contains>" +
                "<FieldRef Name='Column2' /><Value Type='Text'>" + newval + "</Value>" +
            "</Contains>" +
            "<Neq>" +
                "<FieldRef Name='Title' /><Value Type='Text'>" + curTitle + "</Value>" +
            "</Neq>" +
        "</Or>" +
    "</And>" +
"</Where>" +
"</Query>",
it throws no errors and only returns matching results from column1. I would like to it return matching results if either or both columns finds a match. Can anyone help?

Bob Mac

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>