DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Sort results Datafinder by property name

Solved!
Go to solution

Hello All,

 

I would like to sort my resultlist by property.name = "BENCH":

 

 

Dim oMyDataFinder, oMyQuery, MyDate, MyMin, oMyResults
Set oMyDataFinder = Navigator.ConnectDataFinder("My DataFinder")
If oMyDataFinder.Name = "My DataFinder" Then
Dim AdvancedQuery
Set  AdvancedQuery =Navigator.CreateQuery(eAdvancedQuery)
AdvancedQuery.ReturnType=eSearchFile
Call AdvancedQuery.Conditions.Add(eSearchFile,"BENCH","=", "*")
oMyDataFinder.Search(AdvancedQuery)
Set oMyResults = oMyDataFinder.Results
on error resume next
Call oMyResults.Elements.Sort("BENCH",FALSE)
msgbox(err.number&"  "&err.description)

end if

 

the error is "438 proprietà o metodo non supportati dall'oggetto"

oMyResults.Elements.count is 1

what is the problem?

can i sort by date ("DatatypeDate" property type)?

 

Thanks,

 

Yustas

0 Kudos
Message 1 of 3
(3,433 Views)
Solution
Accepted by topic author Yustas

Hello Yustas,

your variable "oMyResults" is already an elements collection so it does not have an elements member.

Try to use this instead:

 

Call oMyResults.Sort("BENCH",FALSE)

 

Hope that helps,

 

Eva

0 Kudos
Message 2 of 3
(3,432 Views)

thanks Eva,

 

it works,

 

yustas

 

 

0 Kudos
Message 3 of 3
(3,425 Views)