vineetu1
14th January 2007, 11:05
Hi,

I have a single occurance form based on a Main table. Here, when the user tries to modify the record I am putting an application lock to lock that particular order using sections :

choice.modify.set
before.choice:
put.lock()

after.choice:
remove.lock()

Now I have a different form i.e. multioccurance form which shows multiple orders on one screen. Here again I need to put an applicaiton lock to the order which the user is trying to modify.

when i use the choice.modify.set -> before.choice & after.choice ..it does not work. I mean..

If the form is displaying orders 1, 2, 3, 4 and if I click the second record the in the actual.occ field it still stores the 1st record. Hence the 1st order gets locked during the before.choice of modify.set choice.

However during the after.choice part it correctly recognizes the 2nd record but it has not been locked.

Basically, I need to put put a lock on the record which the user clicks.

Any solution for this ?

mark_h
14th January 2007, 17:33
I think if you use the do.occ(actual.occ, put.lock). Then you could put the application lock on the actual record.

vineetu1
15th January 2007, 07:12
Dear Mark,

In fact I am doing it the way you have mentioned "do.occ(actual.occ, put.lock). "

But the issue here is during this stage i.e. choice.modify.set -> before.choice the value of actual.occ is 1 and not really the real actual occurance no. I think the variable gets assigned the value after that.

If I first manually mark the line and then edit it the value of actual.occ is correct.

I even tried to use the function mark.occ() but here again to mark the correct record I first need the correct value of actual.occ

mark_h
15th January 2007, 14:29
Have you tried it in the before.input section on the fields? You can check in the before.input section of each field to see if a lock is set, if not set the application lock. At this point(so early in the morning) I do not see any method around this since you never know what field the user will click in and modify. Then release the application lock in the after.choice of the modify set.

Marioth
15th January 2007, 16:09
Try the on.choice instead of the before.choice option.

mark_h
15th January 2007, 18:14
I do not believe in baan 4 there is an on.choice section for choice.modify.set. I do not know about 5 or ln.

shah_bs
15th January 2007, 18:38
I would try to place the lock in after.choice of choice.mark.occur. It may be removed in the after.choice of choice.modify.set.