Hi All,
I am doing a coding on Employee(Customized). I am finding on 1 table then calling the function to Fill in the values in another Table.
Count is giving me 4 records exist but repeat until is not going to 2nd record. It is only executing the function for first record.
PayEmpPayElement.RESET;
PayEmpPayElement.SETRANGE("Navision Company",NavCompany);
PayEmpPayElement.SETRANGE("Company No.",PayrollCompany);
PayEmpPayElement.SETRANGE("Payroll No.",PayrollNo);
PayEmpPayElement.SETRANGE("Employee No.",Employee."Employee No.");
PayEmpPayElement.SETRANGE("End Date",0D);
IF PayEmpPayElement.FINDFIRST THEN
REPEAT
IF PayEmpPayElement."Fixed Income" THEN
-->InsertPayEmpDetails(Employee,PayEmpPayElement,Payroll,DaysPresentforFixedIncome)
ELSE
InsertPayEmpDetails(Employee,PayEmpPayElement,Payroll,DaysPresentforVariableIncome);
UNTIL PayEmpPayElement.NEXT = 0;
After executing the function for the first time, it is coming out of the repeat until loop. I am inserting the values in the different Table when I call the marked function.
Thanks in advance for the help.
0
Answers
//IF PayEmpPayElement.FINDFIRST THEN
IF PayEmpPayElement.FIND('-') THEN
should become
//IF PayEmpPayElement.FINDFIRST THEN
IF PayEmpPayElement.FINDSET THEN
Just a happy frood who knows where his towel is