You can define a custom column in the Job Monitor by adding
a column in a Datacap Engine
database table.
About this task
To create a custom column in the Job Monitor, you must add
a column in the tmBatch table of the Datacap Engine database.
The column name must be preceded by pb_, such
as pb_allowed. Configure the data type for
MSSQL as nvarchar, for Oracle the data type
is nvarchar2, and the data type for Access
is text.You can use Microsoft Access to define a custom column
in a development environment but Access is not supported for group
filtering because it cannot perform the necessary query for additive
groups.
Procedure
-
In the tmBatch table in the Datacap Engine database,
add a column with the name preceded by pb_,
such as pb_allowed.
-
Save the table and restart the Datacap server.
-
Update the JMView and JobMonitor views.
For SQL, perform the following steps:
- Open the JMView view for design.
- Delete each item appearing in the 'Alias' column.
- Press the ! (exclamation mark) icon.
- Save the view.
- Open the JobMonitor view for design.
- Delete each item appearing in the 'Alias' column.
- Press the ! (exclamation mark) icon.
- Save the view.
For Oracle:
- Use an Oracle database tool to add the newly created column (e.g. pb_MyColumn) into the JMView
and JobMonitor views.
- Execute the changes.
- Save the views.
Note: Custom column data type for Oracle DB is nvarchar2. So, when sorting the
batches by the custom column's numeric value (if any), the batches get sorted by ASCII only.
For DB2
- Use a DB2 Administrative tool to add the newly created column (e.g. pb_MyColumn) into the JMView
and JobMonitor views.
- Save the views.
- Restart Taskmaster Server.
To populate the column with custom
actions
-
If using a Batch Pilot form, the following command is used.
pilot.XtraBatchFieldValue("pb_MyColumn") = "my value"
-
If using a Rulerunner action, the pilot.XtraBatchFieldValue parameter must
be upper-case. For example:
sValue = pilot.XtraBatchFieldValue("PB_MYCOLUMN")
- The value passed to the property must be valid for the database field. That is, it cannot exceed
the maximum number of characters that can be held in the database field or contain characters not
valid for that field type.
Note:
- You can use the Datacap Studio to add the custom actions to update the custom column, but you
can't test it using Datacap Studio by running the batch. You can use Rulerunner to test it.
- Direct queries to the database, such as with SmartSQL, cannot be used, as the entry will be
overwritten when the task completes.
Using batch pilot to update custom columns in the Datacap Navigator Scan taskWhen
StartPanel is enabled, the Scan task enables Batch Pilot to modify and update custom fields as long
as:
- Scan task is attached to the task profile
- Custom fields are configured in StartPanel
Adding a custom field in StartPanel
- Drag the custom field to the StartPanel (Scan Task) window.
- Once the custom field has been added to the StartPanel (Scan task) window, there is an option to
allow these fields to be hidden or displayed in StartPanel.
If fields are not available in StartPanel, Navigator considers the custom fields to be read
only and does not modify the columns in the tmbatch table.
Note: In Datacap Navigator, Custom columns of tmbatch table are modified through wTM API
"SaveBatchAttribute" method.