10-10-2013 09:41 AM
Hi, How do I get with DocumentQuery the Documents which contains a specific Blank keywords? I mean get all the documents where the Keyword "XXXX" has no value.
Regards
10-14-2013 02:19 PM
I also am interested in hearing the answer to this.
10-14-2013 03:27 PM
Adam has a good solution to this problem that i have used previously.
It is about half way down this post and involves a custom query.
Original Post:
Adam Shane:
"
I realize that there have been a number of replies, but I thought that I would weigh in a bit and offer some clarification. In the past our recommendation is to create a SQL Custom Query to narrow down the NULL values for the particular keyword. That being said, there are some nuances with creating the SQL.
For instance, lets say that you were looking for a value of a dual table keyword, the SQL would like like the following:
-- XXX is the Document Type Group num
-- YYY is the dual table keyword num
SELECT *
FROM hsi.itemdata
LEFT OUTER JOIN hsi.keyxitemYYY k0 ON hsi.itemdata.itemnum = k0.itemnum
WHERE k0.itemnum IS NULL
AND hsi.itemdata.itemtypenum IN (XXX)
AND hsi.itemdata.status + 0 = 0
In order to turn this query into a SQL Custom Query in config it would need to look like the following (in this example the keyword num is 1 and document type is 101):
For a single table keyword, the SQL would look like the following:
-- XXX is the Document Type Group num
-- YYY is the single table keyword num
SELECT *
FROM hsi.itemdata
LEFT OUTER JOIN hsi.keyitemYYY k0 ON hsi.itemdata.itemnum = k0.itemnum
WHERE k0.itemnum IS NULL
AND hsi.itemdata.itemtypenum IN (XXX)
AND hsi.itemdata.status + 0 = 0
In order to turn this query into a SQL Custom Query in config it would need to look like the following (in this example the keyword num is 120 and document type is 101):
Finally, I posted some information about caveats that you can run into when creating SQL Custom Queries here.
"
10-15-2013 10:51 AM
There currently is no way in the API to do this using KeywordType.CreateBlankKeyword() with a DocumentQuery.
You can, however, execute the above custom query using DocumentQuery in the Unity API.
10-09-2020 06:55 AM
I apologize for raising this issue from the dead, but is there not a simpler way with the new versions of OnBase?
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.