# Secure Relations

**URL:** https://community.glideapps.com/t/secure-relations/67692
**Category:** Ask for Help
**Created:** [November 11, 2023, 11:44am UTC](https://community.glideapps.com/t/secure-relations/67692 "2023-11-11T11:44:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![MGA](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mga/32/50456_2.png) [@MGA](https://community.glideapps.com/u/MGA)
#### Post date: [November 11, 2023, 11:44am UTC](https://community.glideapps.com/t/secure-relations/67692/1 "2023-11-11T11:44:42Z")

</div>

Hi,

I always use Row IDs for my Relations and have noticed that there seems to be no built in way to avoid that the User deletes a Master Row and therefore leaving Child Rows as orphans, here is a simple example:

Company Table:

![Companies](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/6/a67aa1e8efd2cdd9be3a322fd25ef67f54238c9d.png)

Contacts Table:

![Contacts](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/9/698e2cd43ab3589905c05ccc76a7148b8380f6e2.png)

**Company Row ID** ties the Contact to the Company **Row ID**.

When deleting the Company the Contact become orphan and there is now way to know which Company he belongs to.

I tried to prevent this with Actions but to no avail.

Some help would be highly appreciated since this is not a correct behaviour at all.

Mike

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [November 11, 2023, 11:48am UTC](https://community.glideapps.com/t/secure-relations/67692/2 "2023-11-11T11:48:21Z")

</div>

Create a multiple relation in your Companies table that matches all rows with the same Company RowID in your Contacts table, then only allow a Company to be deleted when that relation is empty.

---

<div class="post-metadata">

### Author: ![MGA](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mga/32/50456_2.png) [@MGA](https://community.glideapps.com/u/MGA)
#### Post date: [November 11, 2023, 12:09pm UTC](https://community.glideapps.com/t/secure-relations/67692/3 "2023-11-11T12:09:24Z")

</div>

[Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy) Many Thanks for the quick relay, Easy Peasy 🙂

![ACTION](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/9/6920a08313e0a0abbe2cf3745ad96c37476221d4.png)

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [November 18, 2023, 12:09pm UTC](https://community.glideapps.com/t/secure-relations/67692/4 "2023-11-18T12:09:52Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
