# "Nested" detail pages

**URL:** <https://community.glideapps.com/t/nested-detail-pages/82649>\
**Category:** Ask for Help\
**Created:** [June 21, 2025, 1:39pm UTC](https://community.glideapps.com/t/nested-detail-pages/82649 "2025-06-21T13:39:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Davies](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/andrew_davies/32/41838_2.png) [@Andrew\_Davies](https://community.glideapps.com/u/Andrew_Davies)\
**Post date:** [June 21, 2025, 1:39pm UTC](https://community.glideapps.com/t/nested-detail-pages/82649/1 "2025-06-21T13:39:05Z")

</div>

Hello all,

This one may be tricky to explain, but here goes.

So I have a collection of events  
Click on the collection and I get a detail page for that event  
On that detail page, I have another collection with a relation to the crew assigned to that event  
Clicking on a collection item and opening another detail page - opens the row in the crew table

At that point I have no easy reference back to the rowID for the original event.

I’ve been setting the row ID of the event to the users table - but wondered if there was a better way as I suddenly think I may be missing something.

Andrew

---

<div class="post-metadata">

**Author:** ![Mazen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mazen/32/84042_2.png) [@Mazen](https://community.glideapps.com/u/Mazen)\
**Post date:** [June 21, 2025, 2:08pm UTC](https://community.glideapps.com/t/nested-detail-pages/82649/2 "2025-06-21T14:08:26Z")

</div>

Hey Andrew, I think this might work for you case.. Use a custom action with set columns before navigating, it goes like this: when a user clicks on the crew member in the collection:

- Use a custom action that first sets a temporary column (like a user-specific column called Selected Event ID) either on the Users table or in a helper table.
- Then navigate to the crew member’s detail screen.
- Now, in that screen, you still have access to the original event ID through that column.

This avoidss permanently writing data and keeps context tied to just the current user session.

---

<div class="post-metadata">

**Author:** ![Mazen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mazen/32/84042_2.png) [@Mazen](https://community.glideapps.com/u/Mazen)\
**Post date:** [June 21, 2025, 2:10pm UTC](https://community.glideapps.com/t/nested-detail-pages/82649/3 "2025-06-21T14:10:47Z")

</div>

You can also consider using a screen that’s based on a helper relation or a joined row that includes both the event and the crew info, depending on how your data is structured. That way, both Row IDs can be referenced from one screen.

---

<div class="post-metadata">

**Author:** ![Andrew\_Davies](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/andrew_davies/32/41838_2.png) [@Andrew\_Davies](https://community.glideapps.com/u/Andrew_Davies)\
**Post date:** [June 21, 2025, 2:53pm UTC](https://community.glideapps.com/t/nested-detail-pages/82649/4 "2025-06-21T14:53:22Z")

</div>

Thanks loads Mazen

That’s pretty much how I do it now - though I have also pulled the rowIdD from the deep link URL with Javascript.

Sounds like I am not missing a trick!

Thanks,  
Andrew

---

<div class="post-metadata">

**Author:** ![Andrew\_Davies](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/andrew_davies/32/41838_2.png) [@Andrew\_Davies](https://community.glideapps.com/u/Andrew_Davies)\
**Post date:** [June 21, 2025, 3:16pm UTC](https://community.glideapps.com/t/nested-detail-pages/82649/5 "2025-06-21T15:16:56Z")

</div>

Just expanded this slightly - I use this Javascript column

let url = p1;  
let index = Number(p2) - 1; // Convert to 0-based index

// Find all /r/{rowId} matches  
let matches = […url.matchAll(//r/([^/]+)/g)];

// Return the requested row ID or null if not found  
return matches[index] ? matches[index][1] : null;

In p2 I pop the nesting level (in my case 2) - that returns the second rowID in the deep link (which is p1)

Saves having to have temporary set column actions etc and a couple of columns.

Thoughts anyone?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 22, 2025, 1:06am UTC](https://community.glideapps.com/t/nested-detail-pages/82649/6 "2025-06-22T01:06:03Z")

</div>

> [@Andrew\_Davies](#):
>
> That’s pretty much how I do it now - though I have also pulled the rowIdD from the deep link URL with Javascript.

Please be careful with this. I have run into scenarios before that the script doesn’t re-run when I navigate through the app. I would either have a “current time” input to force it to run almost constantly (it isn’t 100% fool proof though), or find a way to do it differently (i.e the set column method Mazen suggested).

With the set column method, you must also consider that it is valuable when you access the crew’s screen in that same tab. What if you have another tab where you just put crews on the top level? If you show anything related to the “Event”, it can be confusing, maybe have a conditional visibility that the “Event”-related stuff can only be shown in the Events tab (based on screen URL).

---

<div class="post-metadata">

**Author:** ![Andrew\_Davies](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/andrew_davies/32/41838_2.png) [@Andrew\_Davies](https://community.glideapps.com/u/Andrew_Davies)\
**Post date:** [June 22, 2025, 6:37am UTC](https://community.glideapps.com/t/nested-detail-pages/82649/7 "2025-06-22T06:37:51Z")

</div>

Thanks for this both

A part of me did wonder whether the deep link was reliable. Seems to be working so far and saves a few columns / actions so will see how it goes and keep an eye on it. Suspect I may end up going back to Mazen’s suggestion as really want it to be rock solid.

Thanks again  
Andrew

---

<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:** [June 29, 2025, 6:37am UTC](https://community.glideapps.com/t/nested-detail-pages/82649/8 "2025-06-29T06:37:56Z")

</div>

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