DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

ValueMaxCount Datafinder object

Solved!
Go to solution

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

 

 

0 Kudos
Message 1 of 4
(3,587 Views)

Number of search results returned by DataFinder is defined by MaxCount of DataFinder.Result

0 Kudos
Message 2 of 4
(3,585 Views)
Solution
Accepted by topic author Yustas

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

0 Kudos
Message 3 of 4
(3,584 Views)

Hello,

 

it works,

thanks.

 

Yustas.

0 Kudos
Message 4 of 4
(3,554 Views)