I´m trying to use count to count records but it always returns 0.
It is in a proc after the form is executed.
I´ve tried with the dictionary name and the form name as below
numeric kk1 = count(E_VIAGENS_FORM where E01_FEZ = 1);
numeric kk2 = count(E_VIAGENS where E01_FEZ = 1);
but if I count them by hand it works
numeric kk3 = 0;
do i = 1 until i > totocc(e_viagens_form)
if e01_fez(i) = 1 then inc(kk3); endif;
enddo;
count records in a roster in a data entry
Re: count records in a roster in a data entry
Count should work in that case. If send us a test app so we can reproduce we will look into it.
Re: count records in a roster in a data entry
Here is the test you asked for.
Attached the apc for testing the counts. It is a real application composed of a menu program and the interview program. I´m just sending the interview.
In order to see the problem I just create two cases.
Please, execute the program and click in the first case. I put a skip at the beginning for you to go direct to the E block. Advance thru all the fields (at E12 it will have na accept because I skipped the persons, it does not matter, just click on “Aceita”).
When you reach Z04 you´ll see the errmsgs with the counts. Both counts are 0 whereas the counting with do is 1
By the way, there is a commented delete at line 103 which is giving me a compiler error and I do not know why.
Attached the apc for testing the counts. It is a real application composed of a menu program and the interview program. I´m just sending the interview.
In order to see the problem I just create two cases.
Please, execute the program and click in the first case. I put a skip at the beginning for you to go direct to the E block. Advance thru all the fields (at E12 it will have na accept because I skipped the persons, it does not matter, just click on “Aceita”).
When you reach Z04 you´ll see the errmsgs with the counts. Both counts are 0 whereas the counting with do is 1
By the way, there is a commented delete at line 103 which is giving me a compiler error and I do not know why.
- Attachments
-
- 90_Josh.rar
- (456.46 KiB) Downloaded 311 times
Best
Ari
Ari
Re: count records in a roster in a data entry
This one is missing some dictionary files too.
Re: count records in a roster in a data entry
Sorry, I copied the files but did not change the fmf (and there was a missing dict too).
Here a fresh one.
Here a fresh one.
- Attachments
-
- 90_Josh_A.rar
- (461.57 KiB) Downloaded 305 times
Best
Ari
Ari
Re: count records in a roster in a data entry
That does seem to be a bug with count. We will look into it. Fortunately you have a workaround by using the loop. Just stick with that for now.
The syntax error on line 103 is because you are trying to delete the form rather than the roster row. Try using instead.
The syntax error on line 103 is because you are trying to delete the form rather than the roster row. Try using
Code: Select all
delete(B_MORADORES000(i));