Hi,
I have text fields numbered Text.900 thru to Text.980. I am trying to adapt the following formula (without Luck) to pull out the letters MG,SW,MI,CW out of the text fields and sum them.
The user would be entering in the text fields MI-20000-455 or CW-45000555-99 0r 99-0000000-12, variation of numerals, but the one constant is the MI CW MG SW
So I need to count the instances of them if possible?
var sum = 0;
// Loop through the input fields
for (var i = .900; i < .980; i++)
{
if (getField("Txt" + i).valueAsString === "MI")
{
var num = getField("Text." + i).value;
sum += Number(num);
}
// Set this field value equal to the sum
event.value = sum;}
Any ideas how to do this....
Cheers Stephen
acrobat 10.01 windows
George Kaiser