12-13-2010 09:09 AM
Hello All ,
I would like to limit the number of results. "oMyDataFinder.ValueMaxCount = 50" doesn't work in this combination. the Number of results is allways 200 (like default).
Where is my mistake?
Dim oMyDataFinder, oMyQuery, MyDate, MyMin, oMyResults
Set oMyDataFinder = Navigator.ConnectDataFinder(Test@test)
If oMyDataFinder.Name = Test@test Then
Dim AdvancedQuery
Set AdvancedQuery =Navigator.CreateQuery(eAdvancedQuery)
AdvancedQuery.ReturnType=eSearchFile
call AdvancedQuery.Conditions.Add(eSearchFile,"FILENAME","=", "*")
oMyDataFinder.Search(AdvancedQuery)
oMyDataFinder.ValueMaxCount = 50
Set oMyResults = oMyDataFinder.Results
end if
Thanks,
Yustas
Solved! Go to Solution.
12-13-2010 09:50 AM
Number of search results returned by DataFinder is defined by MaxCount of DataFinder.Result
12-13-2010 09:51 AM
Hi Yustas,
DataFinder.ValueMaxCount restricts the number of indexed values for one property, returned by GetValueList. For example:
...
oMyDataFinder.ValueMaxCount = 60
Dim oIndexedProperties, oIndexedProperty
Set oIndexedProperties = oMyDataFinder.GetIndexedProperties(eSearchChannel)
Set oIndexedProperty = oIndexedProperties("name")
msgbox oIndexedProperty.GetValueList.Count
...
To restrict the number of results try this:
...
call AdvancedQuery.Conditions.Add(eSearchFile,"FILENAME","=", "*")
Set oMyResults = oMyDataFinder.Results
oMyResults.MaxCount = 50
oMyDataFinder.Search(AdvancedQuery)
msgbox oMyResults.Count
...
Hope that helps,
Eva
12-15-2010 05:08 AM
Hello,
it works,
thanks.
Yustas.