pjohns
16th October 2002, 14:34
Hello,
I have a form field which is being used to allocate a sequential number to our Baan record, via the program script. At the moment the form field is set to input which allows the user to overtype the auto allocated number. I want to prevent this but the changes I am trying are effecting the functionality of the seq. number allocation.
When the session is opened a seq number is allocated to the form field the user then populates the form and saves the record. The user can also copy another record and when saved a new seq. number will be allocated.
To make the form field non-editable I have set the field type to 'Display Only' in Maintain Forms. I have then entered a form section into the session script so that the form, upon opening, runs the function to create the next free seq number and displays the field. But when I make these changes the seq number is only generated when I open the session for the first time. If I add a record and then try to add another the new seq number is not generated the same happens if I try to copy a record.
Could you please advise where I'm going wrong?
I have attached a file showing extracts from my script.
Thanks
PJ
I have a form field which is being used to allocate a sequential number to our Baan record, via the program script. At the moment the form field is set to input which allows the user to overtype the auto allocated number. I want to prevent this but the changes I am trying are effecting the functionality of the seq. number allocation.
When the session is opened a seq number is allocated to the form field the user then populates the form and saves the record. The user can also copy another record and when saved a new seq. number will be allocated.
To make the form field non-editable I have set the field type to 'Display Only' in Maintain Forms. I have then entered a form section into the session script so that the form, upon opening, runs the function to create the next free seq number and displays the field. But when I make these changes the seq number is only generated when I open the session for the first time. If I add a record and then try to add another the new seq number is not generated the same happens if I try to copy a record.
Could you please advise where I'm going wrong?
I have attached a file showing extracts from my script.
Thanks
PJ