get_CharConfidence method
The get_CharConfidence method gets the primary or alternative character data that is associated with a field. You can use this method when you need to pass the character data value to a variable or action.
.NET only: For VBScript, use CharConfidence property instead.
This method gets the confidence level (cn)
of the primary character value or alternative value. Within the XML
file, the confidence level is a digit from 1 (lowest confidence) to
10 (highest confidence). In the following example XML setup node for
the field, Vendor, the character primary confidence
level is 6. The first alternative confidence level is 8, and the second
alternative confidence level is 10.
<F id="Vendor">
<V n="TYPE">Vendor</V>
<V n="Position">0,0,0,0</V>
<V n="STATUS">1</V>
<C cn="6,8,10" cr="0,0,0,0">83,49,53</C>
<C cn="6,8,10" cr="0,0,0,0">116,50,54</C>
<C cn="6,8,10" cr="0,0,0,0">105,51,55/C>
<C cn="6,8,4" cr="0,0,0,0">110,52,56</C>
</F>
Syntax
- C#
int get_CharConfidence(int nIndex)
Applies to
Character objects only,Arguments
- nIndex
- 0 specifies the primary value. When the field contains multiple recognition, voting, or multiple-pass data entry values, 1 specifies the first alternative, 2 specifies the second alternative, and so on.
Returns
Integer representing the confidence level.- get_CharConfidence returns the value as it is stored in the XML file. The field-level functions, such as get_AltConfidenceString method, return the internal representation, which is the stored value minus 1.
C# example
This example gets the confidence level of second alternative value of the fourth character (index = 3) in the Vendor field. By using the example XML setup node, the returned value is 4. The root of the search in this case is the page DCO.nConfLevel = m_oDCOPage.FindChild("Vendor").GetChild(3).get_CharConfidence(2);