10-23-2014 11:15 AM
I'm having some trouble wrapping my head around blank or null keywords in onbase.
For my query, i have a legacy keyword that indicates a legacy document.
I need to search for documents where legacy keyword <> 'LASERFICHE'
so i create a keyword of type legacy with the value 'LASERFICHE' and then do:
legacyKeywordType.createKeyword("LASERFICHE");
docQuery.AddKeyword(legacyKeyword, ,KeywordOperator.NotEqual,KeywordRelation.And)
This doesn't seem to work AND i've notice that attempting to perform the same search through my unity client (ie setting the operator to <> and the text to "LASERFICHE" also doesn't work.
by "Doesn't work" i mean it will NOT return the documents with null legacyKeywords.
Do i need to also create legacyKeywordType.createBlankKeyword() and add it to the doc query -> which i have tried and that doesn't work either?
HELP! currently my workaround is to leave that keyword OUT of the query and filter the returned documents afterwards, which of course is crazily inneficient.
10-23-2014 11:28 AM
Stephen,
In OnBase there is no concept of NULL keyword values unless you are referring to KeywordGroups. This is because if a value does not exist on a document then there is no row in the database which means there is nothing to return. Using the <> will not work because there is nothing to compare your criteria value to. The <> only works if there is a value already assigned to the keyword type on document.
So the keyword is not blank or NULL, it simply does not exists. You will need to return the documents and loop through but instead of looking for the value you would want to look for the keyword type to see if it exists on the document. When looping through the keywords you will notice that any keyword that does not have a value associated with it will not be returned.
Regards,07-14-2018 03:49 PM
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.