Hi
Need some help - attempting to add multiple filters but not getting back expected results. Scenario is I want to filter by intEventID (say 35) and bring back all records that have CanSelectedForPositionInd (a numeric indicator) that is equal to 0 (zero) OR equal to NULL.
Code I am using is:
Dim colCandidates As New NonSelectedCandidatesViewCollection
Dim dtCandidates As New DataTable
Dim sorter As New SortExpression
'** sort by surname
sorter.Add(New SortClause(NonSelectedCandidatesViewFields.CanLastNameText, SortOperator.Ascending))
'** filter by intEventID
Dim objSelectFilter As PredicateExpression = New PredicateExpression
objSelectFilter.Add(New FieldCompareValuePredicate(NonSelectedCandidatesViewFields.EveIdentifier, _
ComparisonOperator.Equal, intEventID))
'** filter by Select For Position Indicator = 0 or IS NULL
objSelectFilter.AddWithAnd(New FieldCompareValuePredicate(NonSelectedCandidatesViewFields.CanSelectedForPositionInd, _
ComparisonOperator.Equal, 0)).AddWithOr(New FieldCompareNullPredicate(NonSelectedCandidatesViewFields.CanSelectedForPositionInd))
'** old-code objSelectFilter.AddWithOr(New FieldCompareNullPredicate(NonSelectedCandidatesViewFields.CanSelectedForPositionInd))
dtCandidates = colCandidates.GetMultiAsDataTable(objSelectFilter, 0, sorter)
'** return datatable
Return dtCandidates
Grateful if anyone can help with this.
Thanks in advance