Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Searches and order by
magikandrea
Hi,
I'm writing a code that I can use to search documents in a particular folder. I extended the WOM and added the 'Reference_Date' property for documents. This property is a Date field. I would like to implement a code that searches documents in a particular folder and sorts the results by my 'Reference_Date' field. I also would like to have a descending order.
How can I do this? I tried to set the 'order by' value but it is ignored (i.e. the result is not sorted by the EXT::REFERENCE_DATE field).
Find more posts tagged with
Comments
JP0
What method calls are you invoking for your searches?
Nicholas
Your code would be helpful to suggest something?
Thanks Nicholas
JTNeville
there's a technote pre 4.1SP1 that talks about resetting the default sort order, maybe that will help? Would help to see your code.
Nicholas
I just tried seaching it but didn't find, could you please send.
Thanks Nichalas
para.zip
magikandrea
Hi, I'm sorry but I was not able to reply to your posts. Here is my code:
Dim wSrcArg As worksitempcom.WtWorkspaceSearchArgument
Dim mpResultList As worksitempcom.WtSearchResultList
Dim wRetArg As worksitempcom.WtSearchArgumentSearchReturnedItem
Set wSrcArg = mpSesMngrFct.getWorkspaceSearchArgument
Set wRetArg = mpSesMngrFct.getSearchReturnedItem
Set mpColl = mpSesMngrFct.getVector
'Searching for documents
Set mpClass = mpSesMngrFct.GetClassEx("com.imanage.cms.api.workteam.Document")
wRetArg.setItemType mpClass
mpColl.Add wRetArg
wSrcArg.setReturnedItems1 mpColl
'Setting order by and profile condition
Dim strOrderBy As String
Dim strCond As String
strOrderBy = "EXT:
ATA"
wSrcArg.setOrderBy strOrderBy
strCond = "EXT::CEDENTE='XXXXXXX' AND EXT::TIPOSPOOL_RSID IN (108, 109)"
wSrcArg.setProfileCondition strCond
Set mpResultList = mpCatalog.search1(wSrcArg)
As you can see it is a Visual Basic code. I'm developing a program using VB6.
Andrea