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

Apply filter to SP List with C#

$
0
0

I want to apply some filter to SPLIST but when I'm using CAML

and this the condition which I wan to use

(((user == currentuser) && (dept == "editor")) && ((status == published) || (status == edited)|| (status == printed)))

my CAML query is

<Where><And><And><And><And><And><Eq><FieldRef Name='Author' /><Value Type='Integer'><UserID Type='Integer' /></Value></Eq><Eq><FieldRef Name='Dept' /><Value Type='Text'>Editor</Value></Eq></And><Eq><FieldRef Name='Status' /><Value Type='Text'>Published</Value></Eq></And><Eq><FieldRef Name='Status' /><Value Type='Text'>Draft</Value></Eq></And><Eq><FieldRef Name='Status' /><Value Type='Text'>Approved</Value></Eq></And><Eq><FieldRef Name='Status' /><Value Type='Text'>Printed</Value></Eq></And>

But doesn't work correctelly,if you haev any suggestion or other solution to apply filter.

Thank in advance for your help.


Viewing all articles
Browse latest Browse all 25064

Trending Articles



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