# Self Referencing Table within Layouts

**URL:** <https://connect.superhuman.com/t/self-referencing-table-within-layouts/13396>\
**Category:** Ask the Community\
**Created:** [January 22, 2020, 5:04am UTC](https://connect.superhuman.com/t/self-referencing-table-within-layouts/13396 "2020-01-22T05:04:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brendan\_Woithe](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/brendan_woithe/32/11353_2.png) [@Brendan\_Woithe](https://connect.superhuman.com/u/Brendan_Woithe)\
**Post date:** [January 22, 2020, 5:04am UTC](https://connect.superhuman.com/t/self-referencing-table-within-layouts/13396/1 "2020-01-22T05:04:47Z")

</div>

In the spirit of @Paul_Danyliuk’s wonderful method of just trying things that kinda make sense and most of the time they’ll probably work, I set about attempting a rather interesting little Layout challenge.

I have a set of CRM activities (rows in a table) that I’m presenting in a layout. That’s all nice and easy.

However, knowing the awesome power of adding tables into layouts (something I’ve taken tonnes of advantage of) I thought I might go one step further and bring in a self referenced table. Now - its not worked how I’d like - YET - but I feel I’m either just one or two steps away, or I’ve gone about it the whole wrong way / there’s a much easier solution.

So my CRM activities all relate to a company. I filter the table via company - giving me the ability to select all the different activities associated with that company.

But it just shows up as a menu of dates (which is what I intend - but I feel like there’s something much more powerful that can be built!)

So in my CRM Activities table, I added a new column which looksup ALL the entires for that company, and just collects them as a list.

 ![Screen Shot 2020-01-22 at 3.56.19 pm](https://global.discourse-cdn.com/coda1/original/2X/9/9be5df82893cf62cb534ead431c538b6dede9cf7.png)

I then displayed that column in my layout view - and set it to be a table.

My Intended outcome : It would display a small table with all the entries for the current company. I’d just select a few important columns, and all would be awesome.

What happened : I got my table, but it only displays one row (the current one) and only allows columns that are not already in the view to be displayed.

 ![Screen Shot 2020-01-22 at 3.59.39 pm](https://global.discourse-cdn.com/coda1/original/2X/9/9fcc9a98b2fa67d8aa06f3764b630a0e339e6100.png)

I have this strange feeling that there’s something caused by being self referring that is going to cause this problems, but I’m still going to have a red hot go at solving it! 🙂  
Cheers!

**EDIT** : As noted below, I’m a bit of a klutz, but I’m leaving this here for now, as attempting to change it all would just confuse things further. But I wasn’t putting a copy of the viewed table row in this layout at all, but another test table. !!! My bad. Still trying to figure out how to achieve a version of what I’d like, but I’m currently heading in a slightly different direction. At least I understand what was going on now!

If something doesn’t make sense, I need to be much quicker in assuming I’ve stuffed up.

---

<div class="post-metadata">

**Author:** ![Brendan\_Woithe](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/brendan_woithe/32/11353_2.png) [@Brendan\_Woithe](https://connect.superhuman.com/u/Brendan_Woithe)\
**Post date:** [January 22, 2020, 5:09am UTC](https://connect.superhuman.com/t/self-referencing-table-within-layouts/13396/2 "2020-01-22T05:09:06Z")

</div>

I _have_ got a similar result using an external table view…but it would be OH so elegant for that info to be in the layout view as an embedded table.

See below my workaround…

 ![Screen Shot 2020-01-22 at 4.07.23 pm](https://global.discourse-cdn.com/coda1/original/2X/9/9a053bb25393b1e2049a29c48959dc737d4a872e.png)

---

<div class="post-metadata">

**Author:** ![Brendan\_Woithe](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/brendan_woithe/32/11353_2.png) [@Brendan\_Woithe](https://connect.superhuman.com/u/Brendan_Woithe)\
**Post date:** [January 22, 2020, 5:38am UTC](https://connect.superhuman.com/t/self-referencing-table-within-layouts/13396/3 "2020-01-22T05:38:59Z")

</div>

**I’m a bit thick**  
What I thought I was doing and what I was actually doing were two very different things.  
The table I was bringing in was a test contacts table - not the hidden columns in my CRM activities.  
No wonder everything was a little odd.  
I have a couple different paths I’m trying / following up on now. I’ll update as I figure out, unless someone else has some wonderful suggestions / more ideas

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [January 22, 2020, 8:01am UTC](https://connect.superhuman.com/t/self-referencing-table-within-layouts/13396/4 "2020-01-22T08:01:19Z")

</div>

Would be very helpful if you could share the doc, either publicly here or with me privately [actinarium@gmail.com](mailto:actinarium@gmail.com)

I’m curious what you’re having a problem with, but I don’t understand it fully without interacting with the doc myself.

---

<div class="post-metadata">

**Author:** ![Brendan\_Woithe](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/brendan_woithe/32/11353_2.png) [@Brendan\_Woithe](https://connect.superhuman.com/u/Brendan_Woithe)\
**Post date:** [January 22, 2020, 12:45pm UTC](https://connect.superhuman.com/t/self-referencing-table-within-layouts/13396/5 "2020-01-22T12:45:42Z")

</div>

Heya! I have just had a marathon session figuring everything out - and came up with a very different solution to what I initially intended, but its both simpler and much easier for our sales to use!

I understand my posts here were not clear! I’ll try and get some time tomorrow to write up what I found out.

As for nesting tables within themselves, its something I never managed to figure out, but the final solution I came up gave the same result to the user! 🙂 . There’s always more than one way to skin a cat!

Here’s what my final solution looks like (with a hidden control table away behind the scenes!)

 ![Screen Shot 2020-01-22 at 11.46.09 pm](https://global.discourse-cdn.com/coda1/original/2X/e/e9fc3ad146310975cf54f124b2b2b39aa569fc8b.png)
