Elrodyn
28th March 2012, 11:31
Dear Comrades,
I have a requirement to make the user not allowed to put 0 on the puchase order lines, i believe this can be solved by using form input/ref expression.
but when i put tdpur401.pric>0 on the field, there is no change on the session, do i missed something here? Could you please help me?
Thanks,
Roy
Juergen
28th March 2012, 13:48
Hi Roy,
this will not work, because the input condition determines only the condition for which input on the input field is allowed.
Try with set "Mandatory Input" for field tdpur401.pric in tab "General".
Regards,
Juergen
BaanInOhio
28th March 2012, 21:54
Try with set "Mandatory Input" for field tdpur401.pric in tab "General".
That doesn't always work in LN - if you don't visit (click on or tab past) the field, the message is never posted. Also, if you do tab past the field and receive the message, you can still proceed with the zero/blank field and save the record after dismissing the message.
Another option is in a user exit script for the table with a check and DAL error message in the 'before.before.save.object' function.
Juergen
29th March 2012, 09:43
Yes, BaanInOiho is correct and I was to fast with my posting.:(
BaanInOhio
29th March 2012, 14:57
Yes, BaanInOiho is correct and I was to fast with my posting.:(
I was burned by it last month so still fresh in my mind. Too bad there wasn't a 'ue' type script for field default and validation.
Elrodyn
5th April 2012, 04:55
hello All,
thank you for the informations, i have tried also by altering the table definiton and to the field of price to be mandatory, this also works.
Roy
Dieter
3rd August 2012, 22:22
Try
attr.mandatory := true, 1
In the Input/Ref. Expression of tdpur401.pric
This should work as well.
regards
Dieter