cancel
Showing results for 
Search instead for 
Did you mean: 

MSSQL query for Auto-Folder Keyword update/replacement configuration

Kevin_Granger
Confirmed Champ
Confirmed Champ

We have what has become a large system of documents types and folders with multiple keywords that update the folder keywords when a document type is set to auto folder. The query below returns all doc types that are set to auto folder to a folder and the Keywords that cause the document to auto folder correctly. I am unable to find how to obtain the Update column information for the Keyword Update actions of No Action, Replace Folder Keywords, Add Folder Keywords. If anyone knows where this is stored in the MSSQL DB that would be very helpful. We are on OnBase v18.1.52 currently.

Refer to screen shot and query below.

Thank you,

Kevin

 

b7ec1705341d4616a1f2917f85eb01bf

select (select foldertype.foldertypename from hsi.foldertype where foldertype.foldertypenum = ak.foldertypenum) folderName,
       (select doctype.itemtypename from hsi.doctype where doctype.itemtypenum = ak.itemtypenum) doc_type,
      (select  keytypetable.keytype from hsi.keytypetable where keytypetable.keytypenum = ak.keytypenum ) Key_type,
       case when ak.flags= 0 then 'True (0)'
            when ak.flags= 6 then 'False (6)'
     else '('+isnull(trim(cast(ak.flags as varchar)),'') +')' end "Auto-Folder",
        ak.*, it.*
from hsi.autokeys ak, hsi.itemtypexkeyword  it
where ak.itemtypenum = it.itemtypenum
  and ak.keytypenum = it.keytypenum                          
order by it.itemtypenum, it.seqnum

3 REPLIES 3

Kevin_Granger
Confirmed Champ
Confirmed Champ

After a bit of assistance this issue has been resolved using the imbedded meaning in the autokeys.flags as follows.

Enjoy,

Kevin

select (select foldertype.foldertypename from hsi.foldertype where foldertype.foldertypenum = ak.foldertypenum) folderName,       (select doctype.itemtypename from hsi.doctype where doctype.itemtypenum = ak.itemtypenum) doc_type,      (select  keytypetable.keytype from hsi.keytypetable where keytypetable.keytypenum = ak.keytypenum ) Key_type,	  ak.flags,       case when ak.flags = 0     then 'True (0)'            when ak.flags & 2 > 0 then 'NOT USED FOR AUTOFOLD'            else '('+isnull(cast(ak.flags as varchar),'') +')' 		end "Auto-Folder",       case when ak.flags & 4 > 0 then 'REPLACE FOLDER KEYWORD'              when ak.flags & 8 > 0 then 'ADD TO FODER KEYWORD'            else '('+isnull(cast(ak.flags as varchar),'') +')' 		end "UPDATE",        ak.*, it.*from hsi.autokeys ak, hsi.itemtypexkeyword  itwhere ak.itemtypenum = it.itemtypenum  and ak.keytypenum = it.keytypenumorder by 1,2,it.itemtypenum, it.seqnum 

 

 

 

very nice - thanks for sharing!

This is great!! Thank you so much!!!