🚀 Set Column Action: Alter a DIFFERENT SHEET'S VALUES!

hi there sir,
i have a ‘subtotal’ column in sheet-1 and want to show it on a ‘form’ which is made from sheet-2. How to do?

You’d need to bring it into sheet 2 somehow using a relation/lookup.

can you please tell how to make relation?

@sam1

https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column

Generally speaking, you need to find or create a column of matching/linking values in each sheet. This is not necessarily the column that has the data that you want to bring over.

Then, in sheet 2, create a relation column in the Glide Data Editor in which you’ll select the two column that “match”. Then create a lookup column that brings the column of data that you need to access into the second sheet.

1 Like

I learned a trick from @Darren_Murphy — I now put a template column in every sheet: tp-link —> with the value

link

No actual use of the template column, bar forcing in the string.

Then I name my re-columns usually just connect tp-link columns together.

1 Like

I’ve done this before. Helpful for making generalized relations between sheets!

every table?
I think you might be getting a bit carried away with this one… :joy:

3 Likes

almost every table!

1 Like

:clap: :clap:

2 Likes

Been such a long time. Welcome back. Hope all things good and well @Glider

Came across this post while looking for ways to delete/write the whole row (except for headers) in Glide. Does anyone know if there’s a way of doing that without scripts?

If you can call an action, you can use an add row action or delete row action.

You might have to explain in more detail what you are trying to do.

1 Like

Hi @Jeff_Hager

I have 1 tab with all products and I use a user-specific column that allows users to add products to the Quantity columns

Once the user places an order, I want to clear all values of this column so the user doesn’t see the order/ can place a fresh order from zero again.

For context, the sum of the values (quantity and total order) are fed to the Cart tab

And by using a compound action I pass all values to the Orders sheet (which BTW was your tip to someone here in the community, so thanks :smiley:)

That gets really tricky. I tend to avoid giving advice on e-commerce style apps because everybody’s app is set up differently. The problem is that there is no way to clear an entire column. I came up with a way to give the illusion of clearing a column by using setting a unique ID on a parent sheet and then setting that same ID on each item row. To effectively clear the selections, you change the parent ID, which is brought in as a single value into the products sheet, and then compared to the ID that was set on the row. If it matches, it’s a selected item, and if it doesn’t match, it’s not selected… The problem here is that you are setting a quantity on each product. My solution works great for selecting an item only once, but when you have multiple of the same item, then it becomes a whole new challenge. I’d have to think about this, but off the top of my head, you could maybe use some variation of the solutions attached below. You would maybe have to set a unique ID on each product to “select” it, but also reset the quantity if you are selecting it for the first time. I’m sure something like that could be done in a custom action. But in the end, you would also have an IF column that would first check if the unique ID on each product matches the parent unique ID. If it doesn’t, then return zero. If it does, then return your quantity amount. That IF column would be what you use to determine your quantities and amounts that get sent to your order sheet. It’s hard to explain without having a working example, but I think it would be possible. But if a user completes their order, or decides to clear their cart, then you can update the parent ID. It wouldn’t clear the quantities in the entire column, but the ID would no longer match and the IF column would return zero or blank for each item instead. That’s probably the best idea I have without sitting down to make an example app.

2 Likes

You might be able to do some sort of tricky logic that clears the quantity not upon submission but upon selecting the item when you have a new order so that it clears itself.

I imagine a conditional action on the inline list I assume you’re using:

  • If user has open order > view details

  • If user has new order > clear quantity > view details

3 Likes

Thank you @Jeff_Hager and @Robert_Petitto for the prompt answer (and sorry for my delayed one)

I end up digging a bit more into the forum and found this solution by Robert and does the trick!

1 Like

may i have a copy of this app?or a tutorial to make like this, how to make it

You can follow this thread

I’ve tried to follow it but I’m still confused where to place it and what component to use. I’m new to this, can you help me with screenshots