Skip to main content

Kofax TotalAgility - How to update a line number column in a capture table at process level


I would like to update a line number column in a capture table at process level. The line number values are not extracted from the document so have to be added programmatically.

How to..

Please find below the sample .NET code calling the UpdateDocumentFieldValues() SDK to update a line number column at the process level:

     public void MyUpdateDocumentFieldValueSample(string sessionId, string docId)
                var cds = new sdk.CaptureDocumentService();
                RuntimeFieldCollection rfc = new RuntimeFieldCollection();
                TableFieldIdentity tfi = new TableFieldIdentity();
                tfi.Name = "LineItems";
                DataSet ds = cds.GetDocumentTableFieldValue(sessionId, null, docId, tfi);
                DataTable dt = ds.Tables[0];
                int lines = 0;
                for (int i = 0; i < dt.Rows.Count; i++)
                    rfc.Add(new RuntimeField() { Name = "LineItems", TableColumn = 5, TableRow = i, Value = lines.ToString() });
                cds.UpdateDocumentFieldValues(sessionId, null, docId, rfc);

  • A new column (position 5) into the Capture Starter Pack Northwest document class.   (TableColumn can be changed as desired)
  • Then a .NET node calling the above method to the Capture Starter Pack process after Validation.
  • Then a loop node to call the method for each document in the folder.







When job completed, the lineItem LineNum column was updated successfully.



Applies to..

KTA 7.3 or above