# Relation Filter - Prevent Self Relation

**URL:** <https://community.fibery.io/t/relation-filter-prevent-self-relation/6078>\
**Category:** Get Help\
**Created:** [April 12, 2024, 6:07pm UTC](https://community.fibery.io/t/relation-filter-prevent-self-relation/6078 "2024-04-12T18:07:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cannibalflea](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/cannibalflea/32/318_2.png) [@cannibalflea](https://community.fibery.io/u/cannibalflea)\
**Post date:** [April 12, 2024, 6:07pm UTC](https://community.fibery.io/t/relation-filter-prevent-self-relation/6078/1 "2024-04-12T18:07:35Z")

</div>

I was wondering if it is possible to set a relation filter that would exclude “This Record”?

In cases where you have a hierarchical relation to the same type (Project → Sub Project), it seems Fibery allows user to setup a relationship from the parent entity to itself. This was surprising for me since I thought the relation field would exclude the entity itself from the possible options. I’m sure there is a reason why the entity itself is not automatically filtered out ([this thread](https://community.fibery.io/t/creating-standard-field-in-entity-that-self-references-that-entity/6076) seems to discuss a situation where this might be needed), but is there a way that creators could set this up in case they don’t want to have self-relations (especially if this results in infinite loops in other formula fields)? I tried to see if I can filter by `Public Id Not Equal to This Record -> Public Id` , but that option didn’t seem to exist.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [April 12, 2024, 7:20pm UTC](https://community.fibery.io/t/relation-filter-prevent-self-relation/6078/2 "2024-04-12T19:20:41Z")

</div>

> [@cannibalflea](#):
>
> In cases where you have a hierarchical relation to the same type (Project → Sub Project), it seems Fibery allows user to setup a relationship from the parent entity to itself.

Can you show what you mean? I can’t get an entity to link to itself

---

<div class="post-metadata">

**Author:** ![cannibalflea](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/cannibalflea/32/318_2.png) [@cannibalflea](https://community.fibery.io/u/cannibalflea)\
**Post date:** [April 12, 2024, 11:18pm UTC](https://community.fibery.io/t/relation-filter-prevent-self-relation/6078/3 "2024-04-12T23:18:11Z")

</div>

> [@Chr1sG](#):
>
> Can you show what you mean? I can’t get an entity to link to itself

This is what I thought and how I had experienced fibery relations in the past. I think this might be a bug with relation filters because when there are no filters setup, I do not get the option to link to self:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/f/f4d89fd7d4c9300c2f6b7f97ab393d5e11fc72fa.png)

However, the moment I setup a relation filter (based on the Channel relation), then all of a sudden, the entity itself appears on the list:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/4/4347f2fa62161021d7ecfb89c8838b3351fe713d.png)

And fibery actually lets you self-relate:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/0/0c1ba3794a5273285aaae4de9dd0afe2c05f6c47.png)

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [April 15, 2024, 5:36pm UTC](https://community.fibery.io/t/relation-filter-prevent-self-relation/6078/4 "2024-04-15T17:36:35Z")

</div>

Thanks for the extra info.  
It is indeed a bug that we ought to fix (it shouldn’t be possible to link an entity to itself)
