Hello,
I'm just getting started with the SDK and examples, but am having trouble with returning only files in a released state through FindFilesBySearchConditions. I've tried the following, but am obviously missing something.
var condition0 = new SrchCond
{
PropDefId = 8, //File Name
SrchOper = 1, //Contains
PropTyp = PropertySearchType.SingleProperty,
SrchTxt = "002500"
};
var condition1 = new SrchCond
{
PropDefId = 33, //Released Revision
SrchOper = 3, //IsExactly
PropTyp = PropertySearchType.SingleProperty,
SrchRule = SearchRuleType.Must,
SrchTxt = bool.TrueString
};
var conditions = new SrchCond[] {condition0, condition1};
I've also tried changing condition1 to:
var condition1 = new SrchCond
{
PropDefId = 42, //State
SrchOper = 3, //IsExactly
PropTyp = PropertySearchType.SingleProperty,
SrchRule = SearchRuleType.Must,
SrchTxt = "Released"
};
Could someone steer me in the right direction? Just want to return released files. Thanks in advance...very much appreciated.
Sean
The code you have so far looks OK. Try running the query manually through the Find dialog. If you get no results through the UI, then you know it's a problem with the search criteria.
If you are still having code issues, post your call to FindFilesBySearchConditions, and I'll take a look.