Count records with a certain flag
I have a button on a screen that performs a script that is supposed to go through all records and display the number of records with a certain flag.
As a test, I created two records and set their "IncompleteFlag = 1". Each time I press the count button, the count goes up by 1. (Rather then only displaying "2" no matter how many times the button is pressed.)
As another test, when I set "IncompleteFlag = 0" on both records and pressed the count button, the count stays at zero.
Thank you for your help, I am not a very good programmer!