Data Validation

What kind of validation on a component would prevent a form from submitting a record that already exists in the spreadsheet?

What type of data are you using to validate that it has “existed”?

Names for example

This is kind of a prevent conflicts booking app I have done so here’s the point.

If you don’t want an existing record to be submitted again, you must have a 2-step “form” to prevent access to submission if that record has already existed, using a relation.

In the first screen, make a details layout and add entry components you would need in a normal form. You don’t need to have it all, this all depends on how you would think the UX will be best for your case.

For example, I will have a name entry writing to a user-specific column. Create a relation linking it back to the sheets that contains all the records, matching the “Names” column.

If the relation is not empty (hence a record with that name has been submitted), show a text warning the user to change the name. If the relation is empty, show the form button.

In the form, record the name and all other things you need in the previous screen, then add more entries in the form before submission.

I hope it helps.

1 Like