cancel
Showing results for 
Search instead for 
Did you mean: 

Adding new keyword to existing documents

David_Lauerhass
Champ in-the-making
Champ in-the-making

I have a request from our business user that they would like to be able to define the order in which documents are displayed when doing a retrieval.  As an example, let’s say that the document types are named A, B, C, and D. When doing a retrieval, they would like for all document types C to be displayed together 1st, then all document types B to displayed 2nd, then all document types D to displayed 3rd and all document types A to be displayed last

 I have played around with the ‘Custom Written SQL’ of Customer Query option and have the following:

 FROM:

hsi.itemdata

  Inner Join hsi.doctype On (hsi.itemdata.itemtypenum = hsi.doctype.itemtypenum)

  Inner Join hsi.keyitem102  On (hsi.itemdata.itemnum = hsi.keyitem102.itemnum)

 WHERE: 

  hsi.keyitem102.keyvaluechar Like '%5KPS%'

 ORDER BY:

  (case hsi.doctype.itemtypename

when 'Vendor Disc.' then 1

when 'M-2B' then 2

when 'MTR' then 3

else 100 end) asc,  hsi.doctype.itemtypename desc

 The problem is I can’t get any user input doing this.  I have been looking at HTML Custom Queries as well, but don’t see how I can do the specific ordering I want. 

 My last idea was I could add a keyword, say ‘Sort Order’, to each document type and assign a value for sort order to each document type.  For example,

 Document Type A would have sort order value of 400

Document Type B would have sort order value of 200

Document Type C would have sort order value of 100

Document Type D would have sort order value of 300

 Through  a custom query, I could sort based on the 'Sort Order' keyword value.   This would work for all new documents brought into the system after I implement the keyword and assign it to the document types.  How can I add this keyword on documents already in OnBase?  I have been trying to use workflow and the ‘Doc - Re-Index Document’ action.  But that requires me to click ‘OK’ for each re-index.  That is not feasible.

Is there some way to add a new keyword to existing documents without having to manually re-index each document in someway?  If it requires scripting and using the OnBase Client API, I have been told that I need to take the ‘API Training Class’, which my company will not let me do at this time.  Or is there same solution to this problem I haven't explored as of yet?

I am using OnBase 12.

Thanks,

Dave

4 REPLIES 4

John_Anderson4
Star Collaborator
Star Collaborator

Workflow would probably be your best bet.

David_Lauerhass
Champ in-the-making
Champ in-the-making

I agree - workflow would make the most sense.  But as I mentioned, 'Doc - Re-index Document' in workflow still forces me to click the Re-Index button for each document.  I've also tried 'Key - Add Keyword to Document' without success.  The only way I have found to get existing documents to acknowledge the new keyword was to force a re-index of the document.

John_Anderson4
Star Collaborator
Star Collaborator

Key - Add Keyword to Document would be what to use. What is happening when you try to use that action?

David_Lauerhass
Champ in-the-making
Champ in-the-making

John - believe it or not, just asking that question, for lack of a better way to say it, 'lit the light bulb'.  I am wanting to use a unique default value for the keyword on each document type.  So when using 'Key - Add Keyword to Document' in workflow, I was not assigning any value.  Since I had no value assigned, the action would not add the keyword.  I found in SysAdmin MGR that default values for keywords only apply at import and indexing.  I'll just have to build in some login in workflow to check the document type and assign the appropriate value to the keyword.  That is definitely doable!

Thanks,

Dave