Re: Next database key pre-filled in form and associated with PropertyModel returns null

2012-07-17 Thread Ian
G'day In part the question was based on a misunderstanding which I have now overcome. I thought that all the columns of the database table had to be present in the form as form fields. This meant that I had to pre-fill values for the key fields. This indeed has the difficulties that you raise.

Re: Next database key pre-filled in form and associated with PropertyModel returns null

2012-07-17 Thread Ian
G'day In part the question was based on a misunderstanding which I have now overcome. I thought that all the columns of the database table had to be present in the form as form fields. But that is not the case. So any column whose value I know ahead of time I don't present on the form - I just

Re: Next database key pre-filled in form and associated with PropertyModel returns null

2012-07-17 Thread Eric Jablow
On Sat, Jul 14, 2012 at 3:03 AM, Ian wrote: > G'day > > Short form: how do I pre-fill a form field with the dynamic value of the > next free database key > > Is your customer demanding that the database ids end up without any gaps? If so, try to work hard to dissuade your customer. Database ids s

Re: Next database key pre-filled in form and associated with PropertyModel returns null

2012-07-17 Thread Alec Swan
How do you determine which next key is available? If two users open the form at the same time will they see the same key? If so, then you need to handle errors from concurrent form submissions with the same key. Which means for one of these concurrent requests you will have to issue a different key