Replies: 1 comment 1 reply
-
Hey @Mcc83, What data source are you using? Are you using the Budibase internal table or an external data source e.g. Postgres, MySQL etc. The answer will differ depending on what you are using. Its pretty straight forward for external tables, you simply add a primary key For the internal table we have auto generated fields, but these don't allow for ids to be entered. They simply auto increment the id of the table keep each id unique. You could do something complicated here and use the public api, along with the execute query action set to a rest endpoint that will check based on the id passed back if there are any rows with the specific id passed back. From here you could then check if any results are returned if there are fail the validation. Then show a message explaining why it failed. I hope this helps point you in the right direction. |
Beta Was this translation helpful? Give feedback.
-
I'm having some trouble here and wanted to confirm if this was even possible.
I'm working with a dataset that needs a Unique ID that can not exist elsewhere in the column. This will look something like EX00001. I want to make sure new users can not create something with that ID while it is still in that table.
I would like to have some sort of error code that pops up on entering a new form (For other reasons as well outside of this). I spent some time looking for an answer and could not find a solution, is there better terminology I should be searching for?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions