Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Query Dtree
Robert_Tom_(eu0017899user1_-_(deleted))
I am trying to run a query using LAPI. It is fairly a simple query but I do not know how to construct the LAPI_SEARCH.ApplyQuery method correctly. What I want is to query dataid from the Dtree where subtype=144 and modifydate = '1/1/06'. Will someone help me construct this query using LAPI? I have the following code. I am very new to LiveLink and need help. Thanks in advance.LLValue llvalListSearchSelect = new LLValue().setList();llvalListSearchSelect.add("DTree");StringBuffer strBufferSearchQuery = new StringBuffer();String NONE = "none";strBufferSearchQuery.append("(SubType : 144) and (modifydate:'01/01/2006'");int mySrchManager=2216;int mysSrchQuery = mysSrch.ApplyQuery(mySrchManager,llvalListSearchSelect, strBufferSearchQuery.toString(),LAPI_SEARCH.SORTBYEXISTENCE, "", 0, 1, NONE, lQR);
Find more posts tagged with
Comments
Tina_Wang
Hi Dilip,If you need to search against the DTREE, it is almost always better to run a livereport than use applyquery. That way the results are retrieved directly from the database instead of the index.To do that, create a livereport containing the sql that is required to the information that is desired and use runreport() to run the LiveReport.If an applyquery is needed, you could try OTSubTypeYou probably want to change the queryConversion to LivelinkQueryLanguage if using Livelink Query Language. Otherwise, it may be a good idea to change the where clause to OTSTARTS format.I hope this helps.Tim