Warans
19th December 2002, 14:02
Hi,

I have three forms (form type 3) multi-occ with view fields, I want to generate serial number for records...based on step_no value.
step_no is a variable having step number from a table.

how to do validations on multi-occ forms...

i.e, whenever user goes to serial number field, first time it will be from table value...say 1,
he goes to next record, it will become 1+step_no = 2 like that..

but when user presses shift+tab key to go back from next field to serial number field, it should not increment...

all i want is : proper validations on generated serial numbers in multi-occ form...

can anyone help ?!

NPRao
19th December 2002, 20:37
I think this is very famous issue everyone faces in BaaN.

Here's a sample code -


field.zmmig101.seqno:
before.input:
attr.input = false
|* If you dont like the user to change the sequence number,
|* you can make it a display field.
if zmmig101.seqno = 0 then
do.all.occ(get.seqno)
zmmig101.seqno = max.seqno + 1
endif
....
function get.seqno()
{
if max.seqno < zmmig101.seqno then
max.seqno = zmmig101.seqno
endif
}

Warans
23rd December 2002, 08:36
Thanks NPRao for your reply!!!