- Goal: simple table and form CRUD app using retool database with auto increment id and a no-edit field on the form showing the selected row id or blank if the form is being used to create a new row
- data entry using the database grid to manually create a new row works fine - a new id is allocated using the sequence method I saw described here. So I think the database is good.
- my entry form includes a no edit number entry field showing the row id. this field is defaulted to null in Inspector.
- when I clear the form (I want to create a new row not edit existing) I use the clearSelection Event handler initiated by a Button click.
Problem: when I clear the form, the id field is defaulted to zero not null, so submission creates (or edits) row id zero rather than allocating the next incremental id.
Seems a simple use case - any chance there is a sample app doing this?
Thank you.