Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

CAML Query for Neq or NotIncludes

$
0
0

Hello,

I am working on a query for a webpart which would do the following:

Pull all posts from a list that are Approved and does not equal EL, VOL, Fund or OP.

I have the opposite of this working fine but when I switched it over to Neq, it didn't work and then I started working with NotIncludes but I can only get the following specified and showing:

Pull all posts from a list that are Approved and does not equal EL.

Once I try to add in an or for VOL, FUnd and OP, it doesn't work at all.  Here's a piece of code I have tried (I have tried several iterations).

Thank you!

<Where><And><Eq><FieldRef Name="_ModerationStatus" /><Value Type="ModStat">Approved</Value></Eq><Or><NotIncludes><FieldRef Name="PostCategory" /><Value Type="Lookup">EL</Value></NotIncludes></Or><Or><NotIncludes><FieldRef Name="PostCategory" /><Value Type="Lookup">Fund</Value></NotIncludes>						</Or>		</And>	</Where>



Viewing all articles
Browse latest Browse all 7589

Trending Articles



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