monica1
1st June 2005, 14:05
I make a change in session tfacp1102s000 to check the field tfacp202.bano. I only see the length of the string. If it is a data with error I show an error message. After show this error the field becomes empty.


field.tfacp202.bano:
check.input:
check.input:
if (tfacp202.btyp = tccom.ctob.bank) and
| (not itfcmg0008.valid.bank.account(tfacp202.bano)) then |#LOCFIN031.o
(not itfcmg0008.valid.bank.account(tfacp202.bano, |#LOCFIN031.sn
tfacp202.badr,
true)) then |#LOCFIN031.en
set.input.error("tfacps0198")
|* Not a valid Bank Account
endif
if len(strip$(tfacp202.bano)) < 12 then
message("La longitud es incorrecta")
set.input.error("")
endif


Thank you in advance,

mgakhar
1st June 2005, 21:50
Monica,
That is the standard functionality of set.input.error(). It will reset the value of the field to whatever it was before it executed the check.input section.

If you do not want the value to be reset, you can use mess() or message() along with choice.again() functions to display the error message and then not allow the user to proceed with the changes. Do make sure that if this is an update or print session, before you update or print, you execute check.all.input().

Hope this helps.
MG.

NPRao
1st June 2005, 23:20
Also refer to - fieldname.check() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_dal_fieldname_check)

If you have a fieldname.check() defined in a DAL then the set.input.error sections from the UI Program scripts are ignored.

monica1
3rd June 2005, 09:37
Finally the problem was solve replacing set.input.error("") by input.again().

Thank you very much,