get_CharValue method

The get_CharValue method gets the ASCII data value of the primary character or alternative character. You can use this method when you need to pass the character data value to a variable or action.

.NET only: For VBScript, use CharValue property instead.
In the following example XML setup node for the field, Vendor, the fourth character has an ASCII data value of 110 for the primary character. Also, the ASCII data value is 52 for the first alternative character and 56 for the second alternative character.
<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,10" cr="0,0,0,0">110,52,56</C>
</F>

Syntax

C#
int get_CharValue(int nIndex)

Applies to

Character objects only.

Arguments

nIndex
0 specifies the primary value. Where the field contains multiple recognition, voting, or multi-pass data entry values, 1 specifies the first alternative, 2 specifies the second alternative, and so on.

Returns

Integer representing the ASCII character value.

C# example

This example gets the second alternative value of the fourth character (index = 3) in the Vendor field. By using the example XML setup node, the returned value is 56. The root of the search in this case is the page DCO.
nCharValue = m_oDCOPage.FindChild("Vendor").GetChild(3).get_CharValue(2);