Transact

⌘K
  1. Home
  2. Transact
  3. Developer Documentation
  4. Scripting Resources
  5. Trigger Field Value Change Script for Table Data Fields

Trigger Field Value Change Script for Table Data Fields

Summary
This feature helps the user to run custom script while changing the table data on the validation screen. System triggers a validation script if you change any table field. The system control defaults to the 1st invalid entry on the table view if the script is ON. This feature works the same way as the field value change script works for document level fields.

Steps to Run the Function:

Pre-Requisite:
1. Go to the Batch Class Management screen.

2. Create a Batch Class or enhance an existing batch class.

3. Add Table Name under the batch class and set “Table Cell Value Change Script” to true. The default value for the field is False.

Screen Print:
Image1

4. Set Table cell value change Script Switch “ON” under validate Document Plugin.
Screen Print:
Image2

5. Configure the table columns and table extraction rules.

6. Apply and deploy the newly added configuration.

7. Go to Ephesoft/SharedFolders/Batch_Identifier/ScriptTableCellValueChange.java

Image3
8. Open the script.Image4
Note: This script is bind to the table, if needed configure the script as required.
Note: Ctrl + open bracket ‘[’ {[} will be used as script enable disable shortcut key.
The following information is displayed in the script:

  • Updated document object
  • Table Name
  • Document Identifier
  • Table Column Name
  • Row index(int)

Batch Execution:
9. Run the batch once the configuration is completed.

10. Click Table button given on top of Validation screen.

Image5

Table view screen displays
11. In the Table view screen, change the field value as shown in the image (image no.) and press the Tab key on the keyboard.

Image7

As expected, the application highlights the first invalid field in the table on the Invoice tiff file.

Image6
Similarly, the application highlights any other field in the table that is changed.
Image8