# Custom action on change in value

**URL:** <https://community.glideapps.com/t/custom-action-on-change-in-value/69441>\
**Category:** Ask for Help\
**Created:** [January 10, 2024, 12:25pm UTC](https://community.glideapps.com/t/custom-action-on-change-in-value/69441 "2024-01-10T12:25:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![HenrikH](https://avatars.discourse-cdn.com/v4/letter/h/e99b99/32.png) [@HenrikH](https://community.glideapps.com/u/HenrikH)\
**Post date:** [January 10, 2024, 12:25pm UTC](https://community.glideapps.com/t/custom-action-on-change-in-value/69441/1 "2024-01-10T12:25:42Z")

</div>

Hi all!

I would like to add a custom “on submit” action that checks if value of a column “Stage” was changed to “Completed”. Right now, I’ve set a condition to check if “Stage” is set as “Completed”, however, this also triggers the action whenever users press submit on a row that already is “Completed”. I only want the action to run when the value changes to “Completed”.

How can I do this?

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/0/70bb3b8677a4c338876b7ee623d447ae67dbfbc5.png)

Thanks,

Henrik

---

<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:** [January 10, 2024, 12:56pm UTC](https://community.glideapps.com/t/custom-action-on-change-in-value/69441/2 "2024-01-10T12:56:07Z")

</div>

You might be able to add a column in the table, such as a completion date column or simply a boolean column.

Then modify the IF condition in your action to also check if that new column is empty or unchecked. As a final step in the action, fill that new column with a date or true using an additional Set Column action.

I’m not big on doing stuff like this in an On Submit action but it should probably work. You may need to add a Wait action before that last Set Column if you start to have problems.

---

<div class="post-metadata">

**Author:** ![HenrikH](https://avatars.discourse-cdn.com/v4/letter/h/e99b99/32.png) [@HenrikH](https://community.glideapps.com/u/HenrikH)\
**Post date:** [January 10, 2024, 1:24pm UTC](https://community.glideapps.com/t/custom-action-on-change-in-value/69441/3 "2024-01-10T13:24:52Z")

</div>

Thanks, Jeff! That worked.

I ended up adding a columned “Stage changed” as a boolean and in the custom action added an action to change this to true. Also, added a condition to check that “Stage changed” is empty before running the action.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/5/9520d6c6c600c16a3be1c8efef29366f875b685d.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/1/c1530c589cbfde95ceeb8190e1fe89590847731b.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/1/31673da055e4682cac3f7ead4f0a04a1aa1f806d.png)

---

<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:** [January 10, 2024, 1:53pm UTC](https://community.glideapps.com/t/custom-action-on-change-in-value/69441/4 "2024-01-10T13:53:44Z")

</div>

Awesome. My only suggestion is to change the IF condition to check if the boolean is unchecked instead of empty. Booleans can be either empty, true, or false. If you ever need to uncheck that box, your condition may not work as expected because it will be unchecked (false) but won’t be empty.

---

<div class="post-metadata">

**Author:** ![HenrikH](https://avatars.discourse-cdn.com/v4/letter/h/e99b99/32.png) [@HenrikH](https://community.glideapps.com/u/HenrikH)\
**Post date:** [January 10, 2024, 2:11pm UTC](https://community.glideapps.com/t/custom-action-on-change-in-value/69441/5 "2024-01-10T14:11:56Z")

</div>

Great point, I’ve updated it!

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

---

<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:** [January 17, 2024, 2:12pm UTC](https://community.glideapps.com/t/custom-action-on-change-in-value/69441/6 "2024-01-17T14:12:11Z")

</div>

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