Hi,
I'm a new Retool User and have enjoyed learning the application over the past few weeks.
My background is in Oracle database development. Retool has been helpful in allowing me to design a database schema and create the front end.
The table display (across multiple tables), bulk updates, form inserts and editing have been great.
I do have a question about validation. Currently I have one table that is pulled from a SQL query. I've adjusted certain columns so that the fields are editable.
What would the suggested method be for validating the fields before they are updated? For example, I would like to the amount of an invoice. I would like to ensure the amount is > 0 and that the status column is in "Draft" status.
I don't think there is native validation in the Retool app to do this (yet). So would I do this via a SQL script (perhaps a cursor)? Or do I go the Javascript route? (I noticed that the Javascript option notes "trigger other queries and write back data".)
If it's Javascript, would you have any examples I could take a look at and adapt?
One more question - I noticed if I create a BulkUpdate query, one option is Bulk Update via Primary Key. Is the Primary key restricted to one column? Or can I use a composite primary key (based on two columns)?
Much appreciated!