Jordi.Tolra
11th December 2008, 14:00
Hello,

I would like to know if there is any similar function to do.all.occ, but to apply an action to the occurrences that are marked, not for all the ocurrences.

does anybody know if it is possible and how?

thanks & regards

Jordi

george7a
11th December 2008, 14:06
Hi,

In LN there is a function called do.selection: void do.selection( boolean mode, function_name [, ... ] )It executes the specified function for all marked occurrences. I did not see it in Baan 4 though.

- George

raikar_raviraj
11th December 2008, 14:40
In BaaN IV there is a keyword "marked", but this works for only one marked record at a time. In case of multiple marked occurrence it selects the first marked record.

SergioRuiz
11th December 2008, 15:26
I think you can use the combination of mark.table and restore.rcd.main to get the rows that have been selected and perform the action you want on them.

_Ralph_
11th December 2008, 15:36
Hi,

In LN there is a function called do.selection: void do.selection( boolean mode, function_name [, ... ] )It executes the specified function for all marked occurrences. I did not see it in Baan 4 though.

- George

do.occ can be used too.


function void do.occ (long occurrence, function_name function_name, function_name ...)

mark_h
11th December 2008, 16:25
Sample for 4c4 using do.occ.

for i = 1 to filled.occ
if(mark.table(i)) then
do.occ(i,add_peg_record)
endif
endfor

Jordi.Tolra
12th December 2008, 11:19
Thanks Mark,

I already found the same solution that you proposed and it worked. In fact, it was slightly different, I used fattr.occurnr instead of filled.occ. My code is:

for i = 1 to fattr.occurnr
if mark.table(i) = 1 then
do.occ(i,unblock.order)
endif
endfor