klixy23
27th June 2003, 13:28
I have a little maintanance session with two form fields "orno.f" and "orno.t". These fields are set by before.field section with the min and max orno number. I change both fields to select a range and start the process.
If the choice.cont.process on.choice section is executed both fields are changed to the previous (min/max) value and the process run with wrong range.
This is only once after a new session start. If I select a range again, the new field values are used in process.
Any ideas?
jospriet
27th June 2003, 15:23
Incluye la inicializacion en la seccion "form" en lugar de "before.field"
Originally posted by klixy23
I have a little maintanance session with two form fields "orno.f" and "orno.t". These fields are set by before.field section with the min and max orno number. I change both fields to select a range and start the process.
If the choice.cont.process on.choice section is executed both fields are changed to the previous (min/max) value and the process run with wrong range.
This is only once after a new session start. If I select a range again, the new field values are used in process.
Any ideas?
dorleta
27th June 2003, 16:03
It's better in ttaadv3101m000 mark the field by default and put in the next field
fmin($#) in one field and fmaz($#).
in the the section init.form of your screen the next sentence:
get.screen.defaults()
Ruskin
30th June 2003, 06:44
Don't use the script to default these fields. In the form editor, open the field and enter a default value (in Baan 5, it's on the Expr. tab and you need to set the Initial Value. For Baan 5, this would be "" and fmax($#) as tcorno is a string. In Baan 4, it's the 'Default' and should be 0 and 999999).
If you do set the values in the script, be careful using the before.field section. A better option would be to set them in the init.form sub section of the form.1 section. As suggested, you may want to use get.screen.defaults() as well.
klixy23
30th June 2003, 09:26
But in this case I don't get the min and max value from a table select as field default.
And why is it only after first enter of values?
rupertb
30th June 2003, 09:49
Hi Klixy,
Yes you can set the values in the script, however don't use the before.field section of the field - use before.input instead.
In the help text you'll see that the before.field section is normally called twice by the std program once in the 'before.input' situation and again in the 'before.display' situation (Technically when the std program returns to a field to display the values it must call the before.field section).
Gruesse aus Afrika,
Rupert
klixy23
30th June 2003, 13:48
Yes, this is it. I changed the before.field into before.input.
Thanks and have a nice day!