# How do your appended Row ID from a list table to a group table from a button action?

**URL:** <https://community.glideapps.com/t/how-do-your-appended-row-id-from-a-list-table-to-a-group-table-from-a-button-action/58452>\
**Category:** Ask for Help\
**Created:** [February 25, 2023, 3:27am UTC](https://community.glideapps.com/t/how-do-your-appended-row-id-from-a-list-table-to-a-group-table-from-a-button-action/58452 "2023-02-25T03:27:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kdo/32/59997_2.png) [@kdo](https://community.glideapps.com/u/kdo)\
**Post date:** [February 25, 2023, 3:27am UTC](https://community.glideapps.com/t/how-do-your-appended-row-id-from-a-list-table-to-a-group-table-from-a-button-action/58452/1 "2023-02-25T03:27:22Z")

</div>

Hello!

I am trying to build a dynamic ordering system with Glide Pages.

As the line items are selected, I want it to create a cart and have the individual line items associated.

I know that the “relation” function is the tool to use, but I cannot figure out how to associate the line items to the “cart” with the carts unique Row ID.

Anyone know how to grab the Row ID from a cart or group table and have it append to the individual line items?

---

<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:** [February 25, 2023, 3:58am UTC](https://community.glideapps.com/t/how-do-your-appended-row-id-from-a-list-table-to-a-group-table-from-a-button-action/58452/2 "2023-02-25T03:58:04Z")

</div>

If you’re only ever able to have one cart open at a time (per user), then you can use a conditional relation.

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/1/c17955e93125110329e31448df4d34fcb462b2c8.jpeg "Glide: Conditional Relations (and Relations as Conditions!)") ](https://www.youtube.com/watch?v=K8iRKOr55i4)

Here’s one way.

In cart sheet:

- if user is not user → blank
- if cart is complete → blank
- else → cart ID

There should only ever be one value

Bring in the cart ID using a join list column, no separator.

---

<div class="post-metadata">

**Author:** ![kdo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kdo/32/59997_2.png) [@kdo](https://community.glideapps.com/u/kdo)\
**Post date:** [February 25, 2023, 6:19am UTC](https://community.glideapps.com/t/how-do-your-appended-row-id-from-a-list-table-to-a-group-table-from-a-button-action/58452/3 "2023-02-25T06:19:01Z")

</div>

Hey Robert,

Thanks for the direction. I greatly appreciate your assistance. 🙂

I did not think about the “Joined List”, worked like a charm.

Could you clarify what you mean by:

"In cart sheet:

- If user is not user → blank
- if cart is complete → blank
- else → cart ID.  
"

Are you referring to creating a conditional relation field in my “Order Cart” table?

Would you also have any insights on how to create a cart first and relate the individual line items? With my button actions, “Add a Row”, its create 3 line-items and 3 UNIQUE carts. It should be 1 UNIQUE cart with 3-related line items.

Greatly appreciate your insights and expertise.

Best,

---

<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:** [February 25, 2023, 6:29am UTC](https://community.glideapps.com/t/how-do-your-appended-row-id-from-a-list-table-to-a-group-table-from-a-button-action/58452/4 "2023-02-25T06:29:44Z")

</div>

> [@kdo](#):
>
> Could you clarify what you mean by:
> 
> "In cart sheet:
> 
> - If user is not user → blank
> - if cart is complete → blank
> - else → cart ID.  
> "

If-then-else column

> **[If → Then → Else Column | Glide Docs](https://www.glideapps.com/docs/automation/computed-columns/if-then-else-column)**
>
> Produce different values based on conditions.

---

<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:** [February 26, 2023, 8:31pm UTC](https://community.glideapps.com/t/how-do-your-appended-row-id-from-a-list-table-to-a-group-table-from-a-button-action/58452/5 "2023-02-26T20:31:39Z")

</div>

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