cancel
Showing results for 
Search instead for 
Did you mean: 
Daniel_Quill
Elite Collaborator
Elite Collaborator

An image of the client-side toast in action.

OnBase has always tried to keep users informed when events occur within the system.  The Unity Client is no exception to this rule.  In fact, you have probably noticed that every time a custom script is executed that you receive a notification that a script has been run.  This notification typically displays in the bottom right-hand corner of the screen to inform the user that whether a script has successfully executed or failed with an error.  However, the message that is displayed may not be entirely useful to the end-user and may be ignored because they may not know what to do with it or even know what it means.

Well, in OnBase 16, the notification; otherwise known as ‘Status Window’ or ‘Toast Popup’; can be modified to display a message of your choosing. Or better yet it can be disabled completely from being displayed.

Implementation

Using this new feature is extremely easy.  In Unity Automation scripts a new object was added to the script arguments called “StatusMessage” which contains two (2) properties.  The first property, “Enabled”, is a Boolean that provides control of whether the notification displays when the script is complete.  Setting this to false will suppress the notification.  The second, “Message”, is a string allowing the ability to display a custom message in the notification window.  If this property is not set, the Unity Client will still display the notification window but will populate it with default text from the Unity Client. Finally, the message has a maximum length of 255 characters; anything beyond 255 characters will be truncated.

Example

Accessing this new functionality can be done through the existing script arguments.

args.StatusMessage.Enabled = true;args.StatusMessage.Message = "This is a test";

The example here will end up producing the toast contained in the screenshot above.

Specifics

Below is a list a scripting interfaces where this new feature is available.

Document Scripts:

  • DocumentAddModifyKeywords
  • DocumentCrossreferenceScripts
  • DocumentFileImportPostArchive
  • DocumentFileImportPreArchive
  • DocumentFileImportPostArchiveAsRevision
  • ReindexPostArchive
  • ReindexPreArchive
  • SendToCreateNewDocument

Scanning Scripts:

  • Scan Queue - Post Scan
  • Scan Queue - Post Sweep
  • Scan Queue - Pre Scan
  • Scan Queue - Process Input Filter FileList

Indexing scripts:

  • Scan Queue - Index Ad Hoc
  • Scan Queue - Index Document Into Existing
  • Scan Queue - Index Document Type Change
  • Scan Queue - Keyword Blur
  • Scan Queue - keyword Focus
  • Scan Queue - Point and Shoot Indexing
  • Scan Queue - Post Index
  • Scan Queue - Post reindex
  • Scan Queue - Post Secondary Index
  • Scan Queue - Pre Index

GlobalClientScript

  • IClientScript

In Conclusion

This new functionality provides more control over what can be done when utilizing the Unity Automation API. By controlling the script notification, you can now be more informative and provide useful information when building both simple and complex solutions. This will also provide the ability to display more comprehensive messages to the end-users to help them understand what exactly they may have just done in the context of a script execution.

Next week, we'll be looking into the configuration of your Unity API integrations in OnBase Studio. For any questions and comments, be sure to send us a message either through our comments section or the forums.