Is there a way to not allow a row in Table A ...

(Joseph Pentheroudakis) #1

Is there a way to not allow a row in Table A to be deleted if Table B has already mentioned its value (a column in Table B refs Table A)?

Example: I have a table called Runs which lists ferry run information, one row per run. I then have a log table which records ferry boardings, and which has a column the value of which is a run in the Runs table. The way the app works now a user is allowed to delete a row from the Runs table (don’t ask). But I don’t want to allow that if the log table already contains a mention of that run.

As it is now the Delete property is defined for all rows in an entire table, on or off. Is it possible to actually assign conditions to that delete?

Maybe a condition on Editable_If on that column?


(Aleksi Alkio) #2

You could try to add a conditional rule into the system delete action.

(Joseph Pentheroudakis) #3

Thanks @Aleksi_Alkio, so the idea would be to only allow Adds and Updates under certain conditions on that table, right?

And congrats on joining AppSheet! :=)

(Aleksi Alkio) #4

Actually no… when using the action button for this purpose, you just show or hide that system action depending on condition. And thanks.

(Joseph Pentheroudakis) #5

Oh great, thanks Aleksi!