# Less Than Doesn't Work in Actions

**URL:** <https://community.glideapps.com/t/less-than-doesnt-work-in-actions/70751>\
**Category:** Ask for Help\
**Created:** [February 12, 2024, 7:03pm UTC](https://community.glideapps.com/t/less-than-doesnt-work-in-actions/70751 "2024-02-12T19:03:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![robrawks](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robrawks/32/70821_2.png) [@robrawks](https://community.glideapps.com/u/robrawks)\
**Post date:** [February 12, 2024, 7:03pm UTC](https://community.glideapps.com/t/less-than-doesnt-work-in-actions/70751/1 "2024-02-12T19:03:44Z")

</div>

I have a simple lunch ordering app. I’m building a function that emails parents when their balance goes below 0. In the action window I set the condtion `runningBalance < 0` (see picture below). In doing so, the action will not run. If I change it to `runningBalance > 0` it will run without any issue.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/4/c477c0621879954639aa4c67c456e57f2a098e26.png)

Here is the parentDB that I built with the running balance formulas  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/6/260e000ae49e3af170522b2d6e53babefbb23391.png)

I tried doing an “if-then-else” statement to bypass it, but that failed too.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/b/2bbe057b2fabc8f9ffac4ddac9ed5b0d8cacafbe.png)

I hope someone could assist. I think I screwed up somewhere.

---

<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:** [February 12, 2024, 7:09pm UTC](https://community.glideapps.com/t/less-than-doesnt-work-in-actions/70751/2 "2024-02-12T19:09:29Z")

</div>

How are you actually running that action? Is it attached to a button or some other componentm

---

<div class="post-metadata">

**Author:** ![robrawks](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robrawks/32/70821_2.png) [@robrawks](https://community.glideapps.com/u/robrawks)\
**Post date:** [February 12, 2024, 7:18pm UTC](https://community.glideapps.com/t/less-than-doesnt-work-in-actions/70751/3 "2024-02-12T19:18:27Z")

</div>

Hey, thanks for the reply.

It is just a button

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/6/a6477faf3c8f867dbee59b2dc7e94e2feb412149.png)  
I tried placing it in other locations:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/6/460ccdaad647e50d5aaab30d16e7ba8cd91d4fb4.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:** [February 12, 2024, 7:23pm UTC](https://community.glideapps.com/t/less-than-doesnt-work-in-actions/70751/4 "2024-02-12T19:23:59Z")

</div>

Is that button on a screen that’s specific to each row. So for example, are you viewing a specific parent row when you click on the button? Just trying to determine if there button is acting on the row you think it is, or is it always the first row in the table?

---

<div class="post-metadata">

**Author:** ![robrawks](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robrawks/32/70821_2.png) [@robrawks](https://community.glideapps.com/u/robrawks)\
**Post date:** [February 12, 2024, 7:28pm UTC](https://community.glideapps.com/t/less-than-doesnt-work-in-actions/70751/5 "2024-02-12T19:28:57Z")

</div>

I have two buttons. One is outside of the collection that refers to the runningBalance column in the DB. The other button is the one inside the collection.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/2/725b1f23be229ae19ee76a4fbccaac02f65133a1.png)  
In this screenshot you see it ran successfully regardless which button I press. The only change was changing the \< to a \>

---

<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:** [February 12, 2024, 7:43pm UTC](https://community.glideapps.com/t/less-than-doesnt-work-in-actions/70751/6 "2024-02-12T19:43:07Z")

</div>

That action only runs against one row. Which row depends on where you are executing the action. If the button is outside of a collection, then which row depends on a lot of things, but my first guess would be that it’s the first row in the table if the screen with the collection is attached to the first row. If the button is on each collection item or inside the detail screen when to select a collection item, then it should be working correctly since it should be executing against each respective row.

---

<div class="post-metadata">

**Author:** ![robrawks](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robrawks/32/70821_2.png) [@robrawks](https://community.glideapps.com/u/robrawks)\
**Post date:** [February 12, 2024, 8:07pm UTC](https://community.glideapps.com/t/less-than-doesnt-work-in-actions/70751/7 "2024-02-12T20:07:02Z")

</div>

I did follow the advice and it is working now. If I make it an item click, it will notify the individual with the correct verbage. This works for me for the time being.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/2/c2110ecaf79fa7da5acbf406db1e7cbca31f3fea.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:** [February 19, 2024, 8:07pm UTC](https://community.glideapps.com/t/less-than-doesnt-work-in-actions/70751/8 "2024-02-19T20:07:54Z")

</div>

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