Hello all. I'm attempting to create an SPQuery object that queries a list for items with an Approval Status of Pending. I've tried several queries but all result in SPExceptions that state 'Cannot complete this action' when I attempt to loop the items.
Here's what I've tried:
qry.Query = "<Where><Eq><FieldRef Name='_ModerationStatus'/><Value Type='ModStat'>2</Value></Eq></Where>"; qry.Query = "<Where><Eq><FieldRef Name='_ModerationStatus'/><Value Type='ModStat'>Pending</Value></Eq></Where>"; qry.Query = "<Where><Eq><FieldRef Name='_ModerationStatus'/><Value Type='Text'>Pending</Value></Eq></Where>"; qry.Query = "<Where><Eq><FieldRef Name='_ModerationStatus'/><Value Type='Number'>2</Value></Eq></Where>";
I've had no success with any of them but I'm pretty sure the top one should work. Any ideas?
Lester Sconyers