# Relate with self

**URL:** <https://community.glideapps.com/t/relate-with-self/25047>\
**Category:** Ask for Help\
**Created:** [April 2, 2021, 2:41pm UTC](https://community.glideapps.com/t/relate-with-self/25047 "2021-04-02T14:41:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ric\_1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ric_1/32/22052_2.png) [@Ric\_1](https://community.glideapps.com/u/Ric_1)\
**Post date:** [April 2, 2021, 2:41pm UTC](https://community.glideapps.com/t/relate-with-self/25047/1 "2021-04-02T14:41:02Z")

</div>

Is it possible to create a relation with self, filter for a certain condition and display as in inline/list relation in a specific style?

I’m trying to show ratings for a service. The ratings are logged together within the service in a single table. I can relate to itself but the filter option is missing and the style is inherited from the parent service.

---

<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:** [April 2, 2021, 2:49pm UTC](https://community.glideapps.com/t/relate-with-self/25047/2 "2021-04-02T14:49:13Z")

</div>

> [@Ric\_1](#):
>
> Is it possible to create a relation with self, filter for a certain condition and display as in inline/list relation in a specific style?

Yes, I do that a lot. The trick is to create two template columns:

- the first concatenates the columns that you want to filter on
- the second concatenates the specific values from those columns that you want to use as filters
- then you create a multi-relation that joins those two columns

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 2, 2021, 3:12pm UTC](https://community.glideapps.com/t/relate-with-self/25047/3 "2021-04-02T15:12:20Z")

</div>

Yep! What he said👆

rel\_self is a common column type in my apps 🤓

---

<div class="post-metadata">

**Author:** ![adriasoce](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adriasoce/32/24153_2.png) [@adriasoce](https://community.glideapps.com/u/adriasoce)\
**Post date:** [April 2, 2021, 3:20pm UTC](https://community.glideapps.com/t/relate-with-self/25047/4 "2021-04-02T15:20:39Z")

</div>

But in two different tables or in the same one? Which are the use cases of rel\_self?

---

<div class="post-metadata">

**Author:** ![Ric\_1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ric_1/32/22052_2.png) [@Ric\_1](https://community.glideapps.com/u/Ric_1)\
**Post date:** [April 2, 2021, 3:21pm UTC](https://community.glideapps.com/t/relate-with-self/25047/5 "2021-04-02T15:21:05Z")

</div>

Thanks for your quick replies, that works great as a filter but when I’m trying to display the results as relations item the view is inherited from the parent item and cannot be edited without affecting the other.

---

<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:** [April 2, 2021, 3:25pm UTC](https://community.glideapps.com/t/relate-with-self/25047/6 "2021-04-02T15:25:20Z")

</div>

> [@adriasoce](#):
>
> But in two different tables or in the same one? Which are the use cases of rel\_self?

Either/or. `rel-self` is by definition linking a table to itself, but the same technique can be used for linking two different tables. I like it because it means the filtering logic is kept in the GDE, and it quite often means you don’t need to apply any filtering conditions to the inline list components (which can very quickly become complex and unwieldy).

---

<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:** [April 2, 2021, 3:27pm UTC](https://community.glideapps.com/t/relate-with-self/25047/7 "2021-04-02T15:27:58Z")

</div>

> [@Ric\_1](#):
>
> Thanks for your quick replies, that works great as a filter but when I’m trying to display the results as relations item the view is inherited from the parent item and cannot be edited without affecting the other.

hmm yes, I think I get what you mean, and I don’t have an immediate good answer. It’s something I’d need to experiment with.

---

<div class="post-metadata">

**Author:** ![Ric\_1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ric_1/32/22052_2.png) [@Ric\_1](https://community.glideapps.com/u/Ric_1)\
**Post date:** [April 2, 2021, 3:31pm UTC](https://community.glideapps.com/t/relate-with-self/25047/8 "2021-04-02T15:31:30Z")

</div>

It appears that relation items cannot be used in this case. Buttons and action text with a link screen to the self relation are possible work around. Nonetheless, one step further - thank you!
