I have adding a new record to the table and bulk update all working with one exception. I would like to be able to set certain columns (fields) to be required. I do get an error back from the database when Not Null fields are not filled in, but it is gibberish to the users.
I suppose I could add Failure Conditions to the query to parse the error and translate it for the user.
Or I could fire a JS query to validate the record before triggering the insert/update queries.
I canβt think of a cleaner way to accomplish this at the moment, adding a βrequiredβ option to the column settings would be an awesome feature here.
Another hacky option to add ontop of this in the meantime would be some CSS to disable the save changes button based on evaluating some of the values in table.recordUpdates like this:
Iβm going to go ahead and move this to the feature request section for the moment, this does seem like something that should be supported as a column setting.
+1 here. Also, it would be great if the users could see which field is mandatory before triggering the update. Like in some MySQL clients showing * beside the name of not null columns.
@Dataland I've surfaced internally that there's additional interest in this!
In the meantime, something that could potentially get you closer to creating a required field/column functionality:
This topic was originally about the legacy Table component, before Table was revamped a bit over a year ago. The new Table has an option to add logic to disable the save button dynamically. One workaround could be to write some custom javascript to disallow saving changes when certain info is missing:
We'll update this topic here if building this into the product in a more integrated way is prioritized for the near term by our product team!