To reproduce it on the desktop I can click a few fields as passed and then click one field on and off in succession and eventually the counter will become incorrect.
The code is simple - I start with a total number of items and track passes by incrementing or decrementing a counter. I have tried it with both decimal and integer fields and the results are exactly the same. I use decision (boolean) fields to check off an item as passed. The code for each field is as follows.
// *********************************************************
//
itemspassed = input.Total_Items_Passed_Decimal;
itemstotal = input.Total_Items_Decimal;
if (input.Brakes)
{
itemspassed = (itemspassed + 1);
}
if (!input.Brakes)
{
itemspassed = (itemspassed - 1);
}
input.Total_Items_Passed_Decimal = itemspassed;
input.Score_decimal_percent = (100.0 * itemspassed / itemstotal);