Live Fields
Live Fields as a feature exposes programmable logic via Javascript to the GlobalSearch document viewer. Available to all customers on version 6.3 or greater, Live Fields serves as a toolbox for building custom behaviors in the viewer.
Live Fields are a component of the viewer. Since it’s possible a customer’s workflow or business process relies on data collected or calculated via a Live Field, edits from the search result grid are disabled when Live Fields are added to an Archive.
Considerations for live fields usage:
Live Fields are part of GlobalSearch’s viewer, and are designed to operate in conjunction with the current user and that user’s permissions. Live Fields should only expected to operate in a manner consistent with the permission set’s of the users accessing the documents in the Archive. For advanced process control with Live Fields, use of multiple Archives may be advised or necessary.
Live Fields operate when a document is opened or refreshed (think save). Live Fields only execute at this time, so build any process control with this in mind. Remember, a user clicking save multiple times will trigger multiple reloads. Such conditions might require logic in your rules to handle repeat loading, etc.
Live Fields do no override system controls like Read Only or System Fields, require parameters, etc.
Live Field Scripting
Live Fields are a powerful scripting tool that allow for calculations, notifications, data look ups, and a myriad of other options. To aid in this process, GlobalSearch incorporates a number of help properties, methods, and behaviors. Refer to the Live Fields developer guide for more detail.
Live Field Samples
The best way to understand Live Fields is by example. Below is a list of actual use cases. The script block in each example has a Copy option in the top right corner to simplify bringing these examples into your own environment.
Warn on blank field
Use this script to warn a user when a specific field on a document is blank. In many workflows, the required attribute of a field may not be practical to implement, but users still need to be aware when the field is left blank. The document in its original state may not have the required data, but at some point in the workflow it should be added, and users should be notified of such a condition.
Geolocation
Collection of latitude and longitude from the client’s browser is a common theme in modern applications. While the user must allow location identification in their browser, when enabled, it can be helpful to track where users are. The example tracks the latitude and longitude of each save operation to a multi-value field.
Identify Logged In User
GlobalSearch uses a cookie to store the logged in user for the current session. For any number of reasons, you may wish retrieve that user’s login name. Using a Live Field, that data can be easily accessed and become accessible.
Reason Code On Open
In scenarios where security is paramount, customer may want to force users to provide details on why they are accessing a document. Use this script to force users to provide a reason for accessing a document when opening.
Open Table Fields By Default
Live Fields have access to the DOM, and can trigger events within it. In some cases, it can be helpful to users if the Table Field Indexer is open by default. A very simple script can trigger this behavior.
Enable Key Free Indexing By Default
Enabling Key Free automatically when a document is opened is helpful in certain indexing scenarios. A simple rule can be defined to trigger Key Free when the viewer is opened. Note that this behavior is equivalent to the user clicking the button themselves.
Annotate Document
A common ask in approval workflows is to stamp a document approved when the document has completed the process. Live Fields solves this problem by calling the GlobalSearch API to add a new annotation to the active document. This is an advanced example designed to illustrate the power of Live Fields as a feature.
Sum Table Field Values
Calculating total amounts from tables is often required when integrating with ERP systems. Using live fields to perform this task (versus a GlobalAction workflow or SQL job) gives the user instant visibility, versus allowing those calculation to happen behind the scenes. Using a Live Field also is a more supportable approach versus a SQL task, removing dependencies on external factors.
Row Level Calculations In Tables
In some cases, it can be helpful to be able to perform calculations in the rows of tables. Live Field rules allow for complete access to the row/column details of table data attached to a document. In this example, we calculate the Extended Amount bases on Quantity and Amount fields in a row.