# Custom Action - Set Columns - Delete Row

**URL:** <https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009>\
**Category:** Ask for Help\
**Created:** [May 20, 2021, 12:30pm UTC](https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009 "2021-05-20T12:30:24Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![rayo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rayo/32/91372_2.png) [@rayo](https://community.glideapps.com/u/rayo)\
**Post date:** [May 20, 2021, 12:30pm UTC](https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009/1 "2021-05-20T12:30:24Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/c/2c80e3eaaed3170de95a0e129de2c44018d8c0a5.png)

Can anyone help advice why the action  
delete row (this row)  
is not performed.

The current custom action is inside a link to screen from a payments table.

i want to update payment details in the order and then delete the payment row to avoid using too many rows.

everything works fine if i remove the ‘Set Columns in UserProfile’ which is the user profile table.

is there anything with the Set Columns in the user profile table that makes Glide confuse which row to delete (this row)?

---

<div class="post-metadata">

**Author:** ![rayo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rayo/32/91372_2.png) [@rayo](https://community.glideapps.com/u/rayo)\
**Post date:** [May 20, 2021, 12:32pm UTC](https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009/2 "2021-05-20T12:32:42Z")

</div>

the 3rd action Set Columns in this row is also not performed.  
the 5th action - navigate to tab Home is performed as well the action 1 & 2.

could the 2nd action set columns in userRelation be causing any problem for actions 3 & 4?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [May 20, 2021, 2:37pm UTC](https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009/3 "2021-05-20T14:37:26Z")

</div>

I’m confuse. You are updating column values in ‘This Row’ and then immediately deleting it? Why would you set values in a row if you are going to delete it anyway?

---

<div class="post-metadata">

**Author:** ![rayo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rayo/32/91372_2.png) [@rayo](https://community.glideapps.com/u/rayo)\
**Post date:** [May 20, 2021, 3:26pm UTC](https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009/4 "2021-05-20T15:26:36Z")

</div>

the 3rd action (set column in this row) is not necessary I just added it to trace the custom action and find out where and what actions were breaking & why. I wanted to see if it was possible to set columns in the current row if the previous action was a set column on the user profile table.

In brief, this is part of a custom checkout, there is an orders table with a row for every order a user makes.  
since the orders table has row owners, hence cannot place a buy button in an order details page. every order has a relation to a payment row in a payments table which has no row owners. The payment screen is where this custom action sits.

at the end of a payment this action should:  
update the user profile table of the user with the status of his current checkout.  
update the order connected to the payment with the payment details.  
delete the payment row from the payment table

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [May 20, 2021, 3:34pm UTC](https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009/5 "2021-05-20T15:34:51Z")

</div>

OK, I thought maybe the two conflicting actions on the same row was possibly a problem, but sounds like it isn’t.

I’ve seen a few posts with people having issues with the Delete Row action, so I’m not sure if it’s a bug or some technicality with how actions runs. I wish I knew the mechanics of how custom actions are executed, but it’s a bit of a mystery to many of us.

Can you explain further why you can’t place the buy button on the order details and need the secondary payment sheet? I don’t see why that would be a problem. I don’t have any answer as to why the Delete doesn’t work, but I think a slight restructure would remove the need to have a payments table.

---

<div class="post-metadata">

**Author:** ![rayo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rayo/32/91372_2.png) [@rayo](https://community.glideapps.com/u/rayo)\
**Post date:** [May 20, 2021, 6:13pm UTC](https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009/6 "2021-05-20T18:13:47Z")

</div>

yes it would be nice to know more on how the custom actions are actually being executed.

i can’t place the buy button in the order details because the orders table has row owners in it. I went down that road and found out that Buy Button’s dont work on tables with row owners. If you place a payment, an error will be returned.  
Row Owners is necessary in this table as you don’t want users orders to be seen by other users, they contain shipping information and contact details

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [May 20, 2021, 7:01pm UTC](https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009/7 "2021-05-20T19:01:57Z")

</div>

ok. I found your old post about that issue.

> [@Custom cart - buy button - this item is no longer available](https://community.glideapps.com/t/custom-cart-buy-button-this-item-is-no-longer-available/26218):
>
> can anyone help advice why I get this message (item no longer available) when I use the buy button? for the product info in the configuration panel: I have used basic text columns for Name, Description, Product ID and basic number column for price. image empty. could it be because the buy button is in a screen based on data from the Orders Sheet not the Products Sheet ? are buy buttons only to be placed in product details? appreciate any help here is a link

I also found this much older post that seems to contradict that theory and only indicates that there would be an issue if a user is not signed in and doesn’t have a row to reference.

> [@Buy Button Transaction Error: "this item is no longer available"](https://community.glideapps.com/t/buy-button-transaction-error-this-item-is-no-longer-available/5785/6):
>
> Actually, @Math_X, this isn’t an issue on our end so much as it is something we did not design the Buy Button for. This is unfortunately an incompatibility between how you’ve set up your data and how you’ve configured your buy screen. Your buy screen is trying to read a “Purchase ID” from the SIGN UP sheet to indicate which product is being purchased. However, this same SIGN UP sheet uses our Row Ownership feature. So if you’ve never signed in before, and you do not have a row in this sheet, we…

But more experienced people agree that you can’t do it with Row Owners enabled.

> [@Payment problem with buy button (Stripe)](https://community.glideapps.com/t/payment-problem-with-buy-button-stripe/6379/19):
>
> You can’t have row owners, and all data passed to Stripe needs to be stored in google sheets (nothing can be user specific or in Glide columns).

So, I guess I’m not really sure. I’ve never used the Buy Button myself outside of some very brief testing to see how it works. The main thing I know about the buy button is that it can’t use computed columns. Beyond that, I have no idea what else is required for it to work correctly.

Anyway, have you tried moving your delete before any other action? I know it seems wrong, but it may be something to try.

I’m not finding it right now, but I seem to recall a post a while back that mentioned the pointer to the row getting lost sometimes depending on what actions your are doing. That theory doesn’t make sense though since your Set Column action still works. It may just be a bug with the Delete action since others have had issues too. You may want to submit a bug to [https://glide-help.zendesk.com/hc/en-us/requests/new](https://glide-help.zendesk.com/hc/en-us/requests/new).

---

<div class="post-metadata">

**Author:** ![rayo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rayo/32/91372_2.png) [@rayo](https://community.glideapps.com/u/rayo)\
**Post date:** [May 20, 2021, 9:03pm UTC](https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009/8 "2021-05-20T21:03:34Z")

</div>

yes i’ve moved the delete to the top, but then none of the other actions are performed. which makes sense as when the row is deleted. Glide probably no longer finds the relation columns in the other actions.

if i delete the set columns in user profile table action. then all the rest work. there must be something about setting columns in the user profile table

---

<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:** [May 20, 2021, 10:04pm UTC](https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009/9 "2021-05-20T22:04:52Z")

</div>

Here’s the link.

> [@bug Compound Action Bug](https://community.glideapps.com/t/compound-action-bug/25478/4):
>
> I think the issue is that when you Add to a different table you are “moving” off of the current table and the pointer is lost. So you should first do the Set Columns for the actual currently active table, then do the add row.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [May 20, 2021, 10:14pm UTC](https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009/10 "2021-05-20T22:14:08Z")

</div>

Yep, that’s the post I was think of. Thanks for finding it.

---

<div class="post-metadata">

**Author:** ![rayo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rayo/32/91372_2.png) [@rayo](https://community.glideapps.com/u/rayo)\
**Post date:** [May 21, 2021, 5:08am UTC](https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009/11 "2021-05-21T05:08:03Z")

</div>

Yes most probably the pointer is being lost. But the problem remains that i need to do a delete row not a set column. I need to add to a different table then come back and delete the row.

---

<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:** [May 21, 2021, 5:10am UTC](https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009/12 "2021-05-21T05:10:12Z")

</div>

If you want a reliable way to delete rows, then I’d recommend using a trigger script.

---

<div class="post-metadata">

**Author:** ![scienter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/scienter/32/2445_2.png) [@scienter](https://community.glideapps.com/u/scienter)\
**Post date:** [May 21, 2021, 5:24am UTC](https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009/13 "2021-05-21T05:24:37Z")

</div>

I’m almost sure that the delete row action is not working

---

<div class="post-metadata">

**Author:** ![rayo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rayo/32/91372_2.png) [@rayo](https://community.glideapps.com/u/rayo)\
**Post date:** [May 21, 2021, 5:27am UTC](https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009/14 "2021-05-21T05:27:43Z")

</div>

i was hoping not to use any scripts in case i wanted to publish my app as a template. U think Glide Tables are better when it comes to delete rows?

---

<div class="post-metadata">

**Author:** ![rayo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rayo/32/91372_2.png) [@rayo](https://community.glideapps.com/u/rayo)\
**Post date:** [May 21, 2021, 5:29am UTC](https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009/15 "2021-05-21T05:29:17Z")

</div>

its working, though a bit confusing sometimes and unpredictable. Definitely need to avoid in custom actions unless necessary.

---

<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:** [May 21, 2021, 5:33am UTC](https://community.glideapps.com/t/custom-action-set-columns-delete-row/27009/16 "2021-05-21T05:33:47Z")

</div>

Honestly, I never use the Glide delete row action. I just find it too flakey, and I don’t trust it.  
I also don’t like the fact that it leaves empty rows in my GSheets.

[https://community.glideapps.com/t/delete-row-action-2-diff-behaviour/26909/2](https://community.glideapps.com/t/delete-row-action-2-diff-behaviour/26909/2)
