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

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?

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

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.

2 Likes

Hey Robert,

Thanks for the direction. I greatly appreciate your assistance. :slightly_smiling_face:

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,

If-then-else column

2 Likes

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