A “Value” property is available for both table cells and header fields and can be used to significantly simplify access to the automatically extracted data from a script.
The field or table cell property Value, that contains the field value in the variable type depending on the field validation type. The Value property is VARIANT and returns date (for date fields), currency (for amount fields), Boolean (for check box fields), index (long value) of the list item (for the list fields) or text for the other field types.
The Value property for the header fields is accessible as pField.Value and for the table cells as pTable.CellValue (Column, Row).
Below is a script sample that demonstrates usage of the properties in the custom script.
Example: Use the Value property
Private Sub Document_Validate(pWorkdoc As SCBCdrPROJLib.SCBCdrWorkdoc, pValid As Boolean) Dim dblValue As Double Dim strFormattedValue As String dblValue = pWorkdoc.Fields.ItemByName("Total").Value strFormattedValue = pWorkdoc.Fields.ItemByName("Total").FormattedText MsgBox "Value = " & CStr(dblValue) & vbCrLf & "Formatted Text = " & strFormattedValue End Sub