learner
5th November 2004, 06:52
Hello,

I am working on BaaN V, and created a Multi occurance session with form type 3.

Now based on the values enetered in the rows i would like to show the total on the top of

the session, I wrote the code in after.field and called the function.



for counter = 1 to filled.occ
do.occ(actual.occ, select.tsmd025.for.hourly.labour.type)
endfor


functions:
function select.tsmd025.for.hourly.labour.type()
{
do.some.calculations.after.reading.some.table ....
}



Now , the problem which I am facing is that as soon as do.occ function is called within this function actual.occ as a parameter it always gives 1, where as there are 10 records.

I tried calling a message box which shows actual.occ with calling do.occ , then proper actual.occ r returned. How do i solve this problem.

Basic pupose is to sum up a coloumn for all the rows and show on the top of session.

Regards

Learner

gambon
5th November 2004, 10:47
Hello,
Instead of do.occ(actual.occ,......) you have to put the variable "counter" as parameter: do.occ(counter,......).
You should be aware of the fact that do.occ only includes the occurances witch are actually displayed on the form.
Regards,
Jürg

learner
5th November 2004, 12:14
Hi,

I tried that also, but it gave the same error, so later instead of after.field sub-section , i used when.field.changes , and it worked.


Regards

Learner