# Issue with custom actions & template columns

**URL:** <https://community.glideapps.com/t/issue-with-custom-actions-template-columns/38500>\
**Category:** Ask for Help\
**Created:** [February 15, 2022, 8:26am UTC](https://community.glideapps.com/t/issue-with-custom-actions-template-columns/38500 "2022-02-15T08:26:12Z")\
**Posts on this page:** 9\
**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:** [February 15, 2022, 8:26am UTC](https://community.glideapps.com/t/issue-with-custom-actions-template-columns/38500/1 "2022-02-15T08:26:12Z")

</div>

Any advice on how to get around this issue.

i’m having a problem with using template columns in Glide in custom actions.

to simplify things.  
imagine this table

| text column 1 | text column 2 | template column 3 (1+2) | text column 4 |
| --- | --- | --- | --- |
| Hello | Name | Hello Name | - |

if we create a custom action that looks like this

action 1: set column1 to Good Bye  
action 2: set column 4 to column 3 value

we expect the result to be

| text column 1 | text column 2 | template column 3 (1+2) | text column 4 |
| --- | --- | --- | --- |
| Good Bye | Name | Good Bye Name | Good Bye Name |

but this doesn’t always happen !  
because between the actions, sometimes the template takes a longer time to execute

action 1: set column1 to Good Bye  
**here the column 3 template column does not execute in time**  
action 2: set column 4 to column 3 value

hence we end up with

| text column 1 | text column 2 | template column 3 (1+2) | text column 4 |
| --- | --- | --- | --- |
| Good Bye | Name | Good Bye Name | - |

---

<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 15, 2022, 9:04am UTC](https://community.glideapps.com/t/issue-with-custom-actions-template-columns/38500/2 "2022-02-15T09:04:25Z")

</div>

[Previous discussion](https://community.glideapps.com/t/sequence-of-custom-actions/35864) on this topic.

I don’t have a lot to add from my earlier comments, however one thought I had is whether you can explore opportunities to preset the value of the template column? Perhaps as part of an earlier action?

Are you using a native or custom form? If the latter, it would probably be easier to preset.

Other than that, it might be worth your while submitting a ticket to Glide support.

---

<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:** [February 15, 2022, 9:20am UTC](https://community.glideapps.com/t/issue-with-custom-actions-template-columns/38500/3 "2022-02-15T09:20:27Z")

</div>

Thanks Darren for help as always.

Yes i considered the option to preset the value of some columns  
though not the template (as that cannot hold a custom value)

things still didn’t work out. I’l try to record something though hard due to the user data showing on the screen.

the above example maybe wasn’t clear. a quick example could be this:

| column 1 text | column 2 text | column 3 template 1+2 |
| --- | --- | --- |
| date is | 15/2/1998 | |

if i have a custom action that does

1. set column 1 to “Today Date is”
2. set column 2 to “Current Date/Time”
3. Show Notification Column 3

although the result should be a notification Today Date is 15/2/2022.

the result comes out as "Today Date is - " with an empty value from column 2.

current date/time takes more time to execute than the action and hence is not returned on time.

---

<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:** [February 15, 2022, 9:22am UTC](https://community.glideapps.com/t/issue-with-custom-actions-template-columns/38500/4 "2022-02-15T09:22:12Z")

</div>

hi @jabid  
maybe a simpler example of what I meant.

---

<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 15, 2022, 9:32am UTC](https://community.glideapps.com/t/issue-with-custom-actions-template-columns/38500/5 "2022-02-15T09:32:47Z")

</div>

> [@rayo](#):
>
> the above example maybe wasn’t clear. a quick example could be this:
> 
> | column 1 text | column 2 text | column 3 template 1+2 |
> | --- | --- | --- |
> | date is | 15/2/1998 | |
> 
> if i have a custom action that does
> 
> 1. set column 1 to “Today Date is”
> 2. set column 2 to “Current Date/Time”
> 3. Show Notification Column 3
> 
> although the result should be a notification Today Date is 15/2/2022.
> 
> the result comes out as "Today Date is - " with an empty value from column 2.

Just taking that example in isolation, would that work better if instead of using column 2 in the template, just use the current date/time?

So instead of 1+2, use 1 + current date/time

---

<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:** [February 15, 2022, 9:50am UTC](https://community.glideapps.com/t/issue-with-custom-actions-template-columns/38500/6 "2022-02-15T09:50:38Z")

</div>

Yes I tried that as well. it works in many cases.  
Yet there are cases (especially when a user just starts using the app)  
where the show notification of column 3 still doesn’t produce the full value of column 3.

i’m going to put it aside and come back later on record a video maybe that helps explain my problem more and possibly any users have different solutions to get the same outcome I am trying to achieve.

thanks Darren as always!!

---

<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 15, 2022, 9:56am UTC](https://community.glideapps.com/t/issue-with-custom-actions-template-columns/38500/7 "2022-02-15T09:56:29Z")

</div>

> [@rayo](#):
>
> Yet there are cases (especially when a user just starts using the app)

Are any of these Set Column actions operating through a Single Relation?  
I ask because I’ve seen instances in the past where a Set Columns via a Single Relation will fail the first time an app is opened, and then work afterwards. I’ve never been able to figure out why it happens (or find a solution), but I have seen it happen. The best theory I have is that the action takes place before everything on the local device has finished computing. But even that doesn’t make a lot of sense, as sometimes I’ve seen this happen some few minutes after the app has loaded.

---

<div class="post-metadata">

**Author:** ![Joe\_Vray](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@Joe\_Vray](https://community.glideapps.com/u/Joe_Vray)\
**Post date:** [February 29, 2024, 9:27am UTC](https://community.glideapps.com/t/issue-with-custom-actions-template-columns/38500/8 "2024-02-29T09:27:45Z")

</div>

We are about two years later, but I have the exact problem described here for a while without finding an answer.

The first time of the day the app is opened and the user triggers the action, it doesn’t go through all the steps and the action is interrupted. The next times, it will work.

In my case, it are two “set” actions that write to two different rows of the same table (through relations). The first “set” always works, but the second fails the first time the action is run.

Any idea/suggestion in the meantime?

---

<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:** [March 1, 2024, 12:15am UTC](https://community.glideapps.com/t/issue-with-custom-actions-template-columns/38500/9 "2024-03-01T00:15:46Z")

</div>

If you can reliably reproduce the behaviour I would suggest submitting a ticket.

> [@How to open a support ticket?](https://community.glideapps.com/t/how-to-open-a-support-ticket/59883/2):
>
> Please note: the option to create a support ticket is only available if your App is in a Pro, Business or Enterprise Team. If you need help with a Billing Issue (on any plan), you should open a Billing Enquiry via the [Glide Support Page](https://www.glideapps.com/support). To create a Support Ticket: Open the App that is giving you problems, and go to Settings → Contact Support: Glide will prompt you to create a support link for your App. Click on Create Link:
