10-28-2022 06:14 AM
Hi,
I need to pass a "where clause" parameter to a custom query. Where is the documentation to do this? Can you give a simple example?
Thanks.
Jay
10-28-2022 07:39 AM
Hi Jay,
Have you looked at the documentation here?
This shows how to add keyword criteria and/or date range criteria for a custom query. If that's not what you are looking for, what kind of criteria are you trying to add?
10-28-2022 08:36 AM
I have looked there. I am would like to perform a wild character match on strings. Something like SQL:
name LIKE '%important stuff%'
Where the "important stuff" is passed to the query through the REST call.
10-31-2022 12:18 PM
Hi
From a quick test, you should be able to use a * as your wildcard for the Keyword Type value being used as the constraint in the Custom Query.
/onbase/core/documents/queries{ "queryType": [ { "type": "CustomQuery", "ids": [ "104" ] } ], "maxResults": 1000, "queryKeywordCollection": [ { "typeId": "1", "value": "Test*", "operator": "Equal", "relation": "And" } ]}
... which will give you the queryId which can be used to generate the results. For example ...
/onbase/core/documents/queries/{queryId}/resultsEx. /onbase/core/documents/queries/595e7bf3-2489-40f9-a86a-266c0e38afa8/results{ "items": [ { "displayColumns": [ { "index": "0", "values": [ "2147085298" ] }, { "index": "1", "values": [ "_ALS - Image - 9/24/2014 - TESTING - 2147095450.TIFF" ] }, { "index": "2", "values": [ "_ALS - Image" ] }, { "index": "3", "values": [ "TESTING" ] }, { "index": "4", "values": [ "MANAGER" ] }, { "index": "5", "values": [ "2014-09-24" ] } ], "id": "2147085298" }, { "displayColumns": [ { "index": "0", "values": [ "2147085303" ] }, { "index": "1", "values": [ "_ALS - Image - 10/24/2014 - 1 - SHANDS.TXT" ] }, { "index": "2", "values": [ "_ALS - Image" ] }, { "index": "3", "values": [ "TESTING" ] }, { "index": "4", "values": [ "MANAGER" ] }, { "index": "5", "values": [ "2014-10-24" ] } ], "id": "2147085303" } ]}
Hope this helps.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.