cancel
Showing results for 
Search instead for 
Did you mean: 

Scan Queue as Keyword

Joey_Heck
Champ in-the-making
Champ in-the-making

I would like to have the scan queue name added as a keyword. I can't seem to find a method for doing this in anything but the unity API. Does anyone have any ideas? (for now I'm creating a script for each scan queue and manually setting the keyword)

3 REPLIES 3

Steve_Reed
Employee
Employee

In your VB script, the name of the current scan queue is available through a property on the keyword panel object:

dim obapp

set obapp = CreateObject ("onbase.application")

dim keypanel

set keypanel = obapp.IndexKeywordPanel

dim scanqueuename

scanqueuename = keypanel.ScanQueue  ' returns the name of the current scan queue

dim panelkeys

set panelkeys = keypanel.Keywords

panelkeys.AddKeyword "ScanQueueNameKeywordType", scanqueuename

keypanel.UpdateKeywords

set panelkeys = Nothing

set keypanel = Nothing

set obapp = Nothing

Mike_Kroner1
Star Contributor
Star Contributor

Hello,

I would like to store the scan queue into a keyword as well.  Can this be done using workflow or would I have to use Unity along with workflow to accomplish this task.

Thanks

Patrick_Sweeney
Star Contributor
Star Contributor

Hello,

It should be possible to get the name of a scan queue associated with a document via a Unity IWorkflowScript executed by a Workflow action.  Assuming the document is part of an active scan batch you could get the Scan Queue this way:

ScanBatch sBatch = args.Document.GetBatch(BatchType.Scan);

string scanName = sBatch.ScanQueue.Name;

Then you can apply the ScanQueue name to the keyword that you would like.  I don't believe that there is a standard Workflow action to accomplish this task so my suggestion is to investigate the Workflow Unity Script to manipulate the keywords in this situation.

Patrick Sweeney
Junior Test Developer
Hyland, creator of OnBase
http://www.onbase.com