![]() |
Enabling Grid Control 1 for checkbox detection.
|
![]() |
Two instances of Grid Control 1 were created to capture all of the desired checkboxes. The Checkbox field will be used to capture the checkboxes and the Document field will be used to capture the document name.
|
![]() |
![]() |
Make sure that Advanced OCR Read is turned on for the column that will be capturing the checkboxes.
|
Make sure the columns that are capturing the checkboxes are using the MarkDetection OCR Engine and that the Adjust filter is set to OFF.
|
Horizontal Table (fixed values based on row number)
|
![]() |
'Grid Control Number
tableNumber = 4
'Get number of rows for current grid
NumRows = ChronoDocument.GetXgridRowCount(tableNumber)
'Create fixed value array
Dim monthArr
monthArr = Array("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12")
'Loop through all rows and search for "true" value
For n = 0 To MNumRows
MValue = ChronoDocument.GetXgridFieldValue(tableNumber,n,"Box")
If MValue = "true" Then
'Set desired actions when the check is found
UserField_Month.value = ChronoDocument.GetXGridFieldValue(tableNumber,n,"Month")
Else
End If
Next
|
Vertical Grid
|
![]() |
'Grid Control Number
Dim tableNumber
tableNumber=1 'we are using table 1
'Grid Row COunt
Dim numRows
numRows=ChronoDocument.GetXgridRowCount(tableNumber)
'Loop through each column
For col = 1 To 13
numTrues=0
For row = 0 To numRows-1
'check for cells set to "true"
fValue = ChronoDocument.GetXgridColumnValue(tableNumber, row, col)
if fValue="true" Then
Call ChronoDocument.set_field_value( "Answer "&col, )
numTrues=numTrues+1
End If
Next
'Check if there is no check or there are more than one check per column
If numTrues > 1 Then
Call ChronoDocument.set_field_value( "Ushtrimi "&col, "More than 1 true")
ElseIf numTrues < 1 Then
Call ChronoDocument.set_field_value( "Ushtrimi "&col, "No answer")
Else
End If
Next
|