cancel
Showing results for 
Search instead for 
Did you mean: 

DocumentQuery search a keyword value that may be blank.

Stephen_Wanhell
Champ in-the-making
Champ in-the-making

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. 

1 ACCEPTED ANSWER

Daniel_Quill
Elite Collaborator
Elite Collaborator

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,

View answer in original post

15 REPLIES 15

Stephen_Wanhell
Champ in-the-making
Champ in-the-making

true enough.  

Thanks for the input guys!

Eileen_Calhoun
Confirmed Champ
Confirmed Champ

Has this been updated in OnBase 17 by chance? It would really be beneficial to search blank values from the UI.

Agree with Eileen, having same issue in OnBase Classic/Thick Client and Unity

I agree as well. In fact, I asked for it back in version 10 and was turned down. They claimed it was a performance issue.

Does anyone know if there are existing SCRs to enable searching for blank values (in Thick, Unity, Web Client, API)?

It seems like a very simple expectation. It frequently forces me to write SQL queries to to answer questions that I would expect an moderately skilled user to answer for themselves using any GUI.
Getting started

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.