# Related Table in Layout not showing add row button

**URL:** <https://connect.superhuman.com/t/related-table-in-layout-not-showing-add-row-button/35445>\
**Category:** Ask the Community\
**Created:** [November 17, 2022, 7:06am UTC](https://connect.superhuman.com/t/related-table-in-layout-not-showing-add-row-button/35445 "2022-11-17T07:06:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Astha\_Parmar](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/astha_parmar/32/29425_2.png) [@Astha\_Parmar](https://connect.superhuman.com/u/Astha_Parmar)\
**Post date:** [November 17, 2022, 7:06am UTC](https://connect.superhuman.com/t/related-table-in-layout-not-showing-add-row-button/35445/1 "2022-11-17T07:06:59Z")

</div>

Hey Folks,

I have a related table showing in a layout. Both the current table and lookup table are unlocked. But for some reason the ‘add row’ button to add more values to the related table is not showing. See screenshot below.

What am I missing?

 ![image](https://global.discourse-cdn.com/coda1/original/3X/9/1/9107ff6f38e02add174c62fcb63d30a11f1b87ce.png)

---

<div class="post-metadata">

**Author:** ![Pch](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/pch/32/17688_2.png) [@Pch](https://connect.superhuman.com/u/Pch)\
**Post date:** [November 17, 2022, 2:03pm UTC](https://connect.superhuman.com/t/related-table-in-layout-not-showing-add-row-button/35445/2 "2022-11-17T14:03:38Z")

</div>

Hi @Astha_Parmar 😊 !

If by this

> [@Astha\_Parmar](#):
>
> I have a related table showing in a layout

… you mean that is this a Multi-select lookup field displayed as a table in your Detail layout, then I think that what could be missing is that :

- either your page is locked

or

- the lookup field used to display this subtable in the detail layout might be calculated  
(i.e.: gathering those 2 rows through a formula instead of having been manually selected).

At least, this what I’ve seen while testing this 😊

---

<div class="post-metadata">

**Author:** ![Astha\_Parmar](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/astha_parmar/32/29425_2.png) [@Astha\_Parmar](https://connect.superhuman.com/u/Astha_Parmar)\
**Post date:** [November 17, 2022, 6:33pm UTC](https://connect.superhuman.com/t/related-table-in-layout-not-showing-add-row-button/35445/3 "2022-11-17T18:33:45Z")

</div>

This was super helpful.

So it is a lookup column BUT I applied a formula based sort to it (sort by x field) and then the add row option dissapeared.

Is there a way around this? Where I could have it sorted but then editable in the popout layout window?

Thank you so much for your help!  
Astha

---

<div class="post-metadata">

**Author:** ![Pch](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/pch/32/17688_2.png) [@Pch](https://connect.superhuman.com/u/Pch)\
**Post date:** [November 18, 2022, 1:23pm UTC](https://connect.superhuman.com/t/related-table-in-layout-not-showing-add-row-button/35445/4 "2022-11-18T13:23:31Z")

</div>

No problem @Astha_Parmar 😊 !

> [@Astha\_Parmar](#):
>
> So it is a lookup column BUT I applied a formula based sort to it (sort by x field)

I’m beginning to think that I’m missing something here 😅 … I’m sorry but where did you used this formula ? 😇

I mean, in the sample you’ll find below, you’ll see a detail view of the `[Table 1]` (so you wouldn’t need to expand the row to see the various lookup fields displayed as tables)

Each lookups/subtables in the detail view are multi-select lookups going from the `[Table 2]` to the`[Table 1]` and each one of them have their selectable options sorted according to a specific `Sort` field in `[Table 2]`.

So, in `[Table 1]` the lookup field :

- `[Lookup - Table 2 - Sorted by Sort 1]` has the selectable options sorted by the field `[Sort 1]` in `[Table 2]`
- `[Lookup - Table 2 - Sorted by Sort 2]` has the selectable options sorted by the field `[Sort 2]` in `[Table 2]`
- `[Lookup - Table 2 - Sorted by Sort 3]` has the selectable options sorted by the field `[Sort 3]` in `[Table 2]`

But I didn’t use any formula to sort the selectable options in any of those lookup fields, I simply added a `Custom sorting` in the `Options setting` of the each one of those lookups …

And whatever I tried, I was still able to select other options for those lookups in the detail view of my `[Table 1]` or in an expanded row of my “original” `[Table 1]`😅

 ![Custom Sorting](https://global.discourse-cdn.com/coda1/original/3X/5/4/54001ac39877e65442df58ed4ddee5fe0ccab9f4.png)

I’m sorry if I’m misunderstanding something here 😇

https://coda.io/embed/QO-_FC3o8d/_susOS?viewMode=embedplay&hideSections=true

---

<div class="post-metadata">

**Author:** ![Astha\_Parmar](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/astha_parmar/32/29425_2.png) [@Astha\_Parmar](https://connect.superhuman.com/u/Astha_Parmar)\
**Post date:** [November 19, 2022, 8:39pm UTC](https://connect.superhuman.com/t/related-table-in-layout-not-showing-add-row-button/35445/5 "2022-11-19T20:39:50Z")

</div>

This was so helpful @Pch

So…it’s a reverse lookup column (aka refernced by), and looks like those don’t have the custom sort option built it. See screenshot below:

 ![image](https://global.discourse-cdn.com/coda1/original/3X/8/f/8f2fd8a86ac1fcab5ee8dbdaa582888724390db9.png)

---

<div class="post-metadata">

**Author:** ![Pch](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/pch/32/17688_2.png) [@Pch](https://connect.superhuman.com/u/Pch)\
**Post date:** [November 20, 2022, 12:26pm UTC](https://connect.superhuman.com/t/related-table-in-layout-not-showing-add-row-button/35445/6 "2022-11-20T12:26:43Z")

</div>

Hi @Astha_Parmar 😊 !

Thanks for the helpful screenshot 😁 !

This is the possibility I’ve mentioned earlier :

> [@Pch](#):
>
> the lookup field used to display this subtable in the detail layout might be calculated  
> (i.e.: gathering those 2 rows through a formula instead of having been manually selected).

So, you can’t (or at least shouldn’t IMHO) have the ability to select/add new option to that specific lookup in the expanded row because the formula already does that for you 😊 : It already finds all the rows from your table `[All Titles by Steps]` where the I guess “manual select” lookup field `[Core Title]` contains `thisRow` … whether you sort the rows returned by the formula or not shouldn’t have changed anything 🤔 …

I mean, I honestly feel there are some confusing inconsistencies in the way lookups behaves within a simple table and how they behave within an expanded row/detail display/view as a subtable 🤨 … (and I have a doc where in the case of a reversed lookup displayed as a subtable, I’m completely incapable of doing what you’re doing here whether `Sort()` is involved or not) 🤔 )

* * *

Anyway 😅 … Sorry for the rant 😇 : Even though I really wouldn’t rely on that specific “lookup as a subtable behaviour” to modify datas (it’s feels too “magical” for me) I think that instead of using `Sort()` you could sort directly the resulting subtable in your expanded row 😊

In the sample you’ll find below, you’ll see once again a detail view of a table (`[Table 2]`) with 3 reversed lookups displayed as subtables …

The first one is unsorted and the formula is :

```auto
[Table 1].Filter([Lookup - Table 2 - Sorted by Sort 2].Contains(thisRow))

```

 ![Reversed Lookup 1](https://global.discourse-cdn.com/coda1/original/3X/d/b/dbefbb7e2057e9d2d662cd0ecf45691c4a508712.png)

The second one is sorted using `Sort()` and the formula is :

```auto
[Table 1].Filter(
  [Lookup - Table 2 - Sorted by Sort 2].Contains(thisRow)
  ).Sort(false,[Table 1].Name)

```

 ![Reversed Lookup 2](https://global.discourse-cdn.com/coda1/original/3X/b/0/b0b759dd5ef79ce67a8dd1c5dfe17bafd7fbe909.png)

And the third one is sorted in the same way I sorted the second one but using this time the “sort setting” of the subtable 😊 . (So the formula for this reversed lookup is the same as the one used for the first reversed lookup)

 ![Sort Lookup Subtable](https://global.discourse-cdn.com/coda1/original/3X/2/1/21e4532a3f96c93a08c3c2875126e13d491553b9.png)

In that case, the `select/add option` still appears 😊 .

https://coda.io/embed/t1AXs06M4u/_susOS?viewMode=embedplay&hideSections=true

Hope this helps 😇

---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/system/32/24484_2.png) [@system](https://connect.superhuman.com/u/system)\
**Post date:** [February 18, 2023, 12:27pm UTC](https://connect.superhuman.com/t/related-table-in-layout-not-showing-add-row-button/35445/7 "2023-02-18T12:27:33Z")

</div>

Closed on February 18, 2023, 12:27pm UTC

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