Delete a record and related records in other tables
I have a table named « Accounts » which is the main table where I add all my customers.
From the Accounts table, I created a Yes/No field which has the mission of deleting the selected account (record) when I modify the field to Yes. Deleting the record works well with the command :
delete this;
I also have other tables that are linked to the accounts table. For example, the "Activities" table.
When I launch the procedure for deleting an account, I would like all the records in the Activities table that are linked to be deleted as well.
Is it possible to do this?
Thanks for your help.
5 replies
-
This is a feature of Ninox and is achieved by setting Composition to Yes on the link to other tables. Deleting a parent will then also delete any children, plus on the parent you can only add new children, not link existing ones, as it assumes there are no orphans (children without a parent)
Regards John
-
said:
I created a Yes/No field which has the mission of deleting the selected account (record) when I modify the field to Yes.Wow, you are a very trusting guy. I wouldn't trust myself to not to be too impulsive and switch the field to Yes and then realize that is not what I should have done.
Content aside
- 1 yr agoLast active
- 5Replies
- 124Views
-
3
Following