set_CharConfidence method

The set_CharConfidence method sets the confidence level for the primary value or of the alternative value of a character in a field.

.NET Restriction: For VBScript, use the CharConfidence property instead.

The confidence level is determined by the cn attribute. Within the page XML file, the confidence level is a digit from 1 (lowest confidence) to 10 (highest confidence). In the following XML sample, the primary confidence level of the fourth character is 6. The first alternative confidence level is 8, and the second alternative confidence level is 4.

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#
void set_CharConfidence(int nIndex, int pVal)

Arguments

nIndex
0 specifies the primary value. Where the field contains multiple recognition, voting, or multipass data entry values, 1 specifies the first alternative, 2 specifies the second alternative, and so on.
pVal
The confidence value (1-10), as stored in the XML file.

This method sets the value as it is stored in the XML file (1-10). For field-level functions such as set_AltConfidenceString, you specify the internal representation, which is the stored value minus 1.

C# example

This example sets the confidence level of second alternative value of the fourth character (index = 3) in the Vendor field. The root of the search in this case is the page DCO.

 m_oDCOPage.FindChild("Vendor").GetChild(3).set_CharConfidence(2, 4);