baanbomb
21st October 2005, 06:32
Dear all:
is that BaaN have a function to lock all fields of a specified occurrence in a form?
like function display.occ() --- Displays all fields of a specified occurrence.
and i don't want to use disable.fields()

Any help would be appreciated.

Regards,

baanprog
21st October 2005, 12:09
hi,

Can you explain what do u mean by locking all the fields?
If you dont want to use disable.fields(), then what do u want to do? Is this a single occ or multi occ form?

regards

beginer
21st October 2005, 12:15
Hi ,

As per your profile u are using BaaN 4.
& BaaN 4 u need to use attr.input = FALSE.
BaaN 5 supports the disable.field functionality & not BaaN 4.
Moreover if u are using BaaN 5 & dynamic forms then can use disable.group().

baanbomb
21st October 2005, 12:29
hi,

Can you explain what do u mean by locking all the fields?
If you dont want to use disable.fields(), then what do u want to do? Is this a single occ or multi occ form?

regards

thanks for your reply first
is a multi occ form
i mean that all the input fields of a specified occurrence only display,but not allow to input(attr.input = false)
it's function similar to disable.fields(), but more easy to use

regards,

baanbomb
21st October 2005, 12:36
Hi ,

As per your profile u are using BaaN 4.
& BaaN 4 u need to use attr.input = FALSE.
BaaN 5 supports the disable.field functionality & not BaaN 4.
Moreover if u are using BaaN 5 & dynamic forms then can use disable.group().

thanks,
i know attr.input = false can meet my station,but i really dont want to use it in every refers field, :(

regards,

abieber
21st October 2005, 14:01
Hi,

it´s easy: just define a "field.all:" section in your script.
You can check there, if the actual field is a multi-occurance field:

field.all:
before.input:
if attr.mulioccur then
attr.input = false
endif

You can add additional conditions relating to special key values or occ-numbers there, if you want.

regards,

Alex

csecgn
22nd October 2005, 14:24
You could try to write a "decission handler" in the section choice.modify.set, subsection before.choice. If your conditions don't allow editing the fields i.e. give a message and after this choice.again().

Regards
csecgn