# Having trouble in button actions. If anyone can help

**URL:** <https://community.glideapps.com/t/having-trouble-in-button-actions-if-anyone-can-help/61420>\
**Category:** Ask for Help\
**Created:** [May 6, 2023, 9:07am UTC](https://community.glideapps.com/t/having-trouble-in-button-actions-if-anyone-can-help/61420 "2023-05-06T09:07:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pratik\_Shah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pratik_shah/32/12416_2.png) [@Pratik\_Shah](https://community.glideapps.com/u/Pratik_Shah)\
**Post date:** [May 6, 2023, 9:07am UTC](https://community.glideapps.com/t/having-trouble-in-button-actions-if-anyone-can-help/61420/1 "2023-05-06T09:07:48Z")

</div>

Hello Guys, @Darren_Murphy @ThinhDinh

I am having trouble using Button bar for adding items and removing items from the list. This is **Form Screen**. When I click on Add More, it shows the next item but when I click on “Remove”, it does not set the column value in actions.

![CPT2305061430-500x174](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/c/6cc5180339fe30606d1127076eb7aef3c35dc1a4.gif)

Following is my configuration for Add More.

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

This is my configuration for Remove.

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

Am I doing anything wrong here? I am not able to figure out.

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [May 6, 2023, 11:00am UTC](https://community.glideapps.com/t/having-trouble-in-button-actions-if-anyone-can-help/61420/2 "2023-05-06T11:00:39Z")

</div>

Are you sure the remove action is falling on your first branch? You can dbl check by placing a show notification above the set column values action something like “yes” or “first branch”

---

<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 6, 2023, 1:16pm UTC](https://community.glideapps.com/t/having-trouble-in-button-actions-if-anyone-can-help/61420/3 "2023-05-06T13:16:59Z")

</div>

You’re checking if size equals 1. In your animation I see 2. I’m guessing it’s not falling into the condition. You are limiting the remove function to only work if there is 1 item.

---

<div class="post-metadata">

**Author:** ![Pratik\_Shah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pratik_shah/32/12416_2.png) [@Pratik\_Shah](https://community.glideapps.com/u/Pratik_Shah)\
**Post date:** [May 6, 2023, 2:44pm UTC](https://community.glideapps.com/t/having-trouble-in-button-actions-if-anyone-can-help/61420/4 "2023-05-06T14:44:21Z")

</div>

@Jeff_Hager Thank you for replying. Actually I kept first item at 0 value. So if the value is 1, second item shall be added. In remove action, I am setting column value at 0, so that it should be removed.

---

<div class="post-metadata">

**Author:** ![Pratik\_Shah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pratik_shah/32/12416_2.png) [@Pratik\_Shah](https://community.glideapps.com/u/Pratik_Shah)\
**Post date:** [May 6, 2023, 2:46pm UTC](https://community.glideapps.com/t/having-trouble-in-button-actions-if-anyone-can-help/61420/5 "2023-05-06T14:46:18Z")

</div>

Hi @Eric_Penn Thank you for responding.  
Yes, its in first branch only. I will try your suggestions though.

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

When I click on Remove button, it always trigger “else” condition.

@Eric_Penn @Jeff_Hager you can see another version of video  
 ![ezgif.com-optimize](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/1/012d3f69377dc94036462187e0e418a8288938b0.gif)

---

<div class="post-metadata">

**Author:** ![Pratik\_Shah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pratik_shah/32/12416_2.png) [@Pratik\_Shah](https://community.glideapps.com/u/Pratik_Shah)\
**Post date:** [May 6, 2023, 3:58pm UTC](https://community.glideapps.com/t/having-trouble-in-button-actions-if-anyone-can-help/61420/7 "2023-05-06T15:58:02Z")

</div>

@Eric_Penn @Jeff_Hager Is this happening because I am doing it inside of Form screen? I tried many trial and errors but not able to figure this out.

---

<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 6, 2023, 4:30pm UTC](https://community.glideapps.com/t/having-trouble-in-button-actions-if-anyone-can-help/61420/8 "2023-05-06T16:30:38Z")

</div>

Can you show a screen shot from the builder layout so we can see which components you have on this screen and how they are arranged? Make sure you show the whole builder window with both side panels visible.

---

<div class="post-metadata">

**Author:** ![Pratik\_Shah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pratik_shah/32/12416_2.png) [@Pratik\_Shah](https://community.glideapps.com/u/Pratik_Shah)\
**Post date:** [May 8, 2023, 5:56am UTC](https://community.glideapps.com/t/having-trouble-in-button-actions-if-anyone-can-help/61420/9 "2023-05-08T05:56:22Z")

</div>

Hi @Darren_Murphy, thank you for responding.  
Here is the full screen.

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

For checking, you can see, I added “Number” column so that I can see if Set column value is working properly or not. It works properly only once. When It try to add two conditions in “Add More” button, e.g. when Number is 0 or empty, set column Number to 1 and when Number is 1, set column Number to 2. But when I click “Add More” button twice, it only works once.

---

<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 8, 2023, 3:02pm UTC](https://community.glideapps.com/t/having-trouble-in-button-actions-if-anyone-can-help/61420/10 "2023-05-08T15:02:15Z")

</div>

Can you try something and change the condition for the Add button to not check for empty. Only check for 0. If my suspicion is correct, the Add function should break completely. I think your action IF logic is looking at a value that doesn’t change, so only your add condition is only hit once and none of the conditions are ever met again.

I suspect that it is because you are inside a form. The action is most likely checking an underlying value in the table and not what you have in the entry component. That entry component doesn’t write anything to the table until you submit the form. In some cases, you can access screen values, but I’m not sure if that’s possible within an action.

I usually don’t attempt to do anything beyond the scope of what a native form is supposed to do, such as place a form within a form, or perform any actions while inside the form. I guess you could try writing to, and accessing the number column from, a user profile row. But I think I would just use a choice component instead to set the number in the new row that will be added, and the conditionally show what you need based on the screen value of that number.

---

<div class="post-metadata">

**Author:** ![Pratik\_Shah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pratik_shah/32/12416_2.png) [@Pratik\_Shah](https://community.glideapps.com/u/Pratik_Shah)\
**Post date:** [May 8, 2023, 3:36pm UTC](https://community.glideapps.com/t/having-trouble-in-button-actions-if-anyone-can-help/61420/11 "2023-05-08T15:36:38Z")

</div>

Thank you for responding @Jeff_Hager.

> [@Jeff\_Hager](#):
>
> I suspect that it is because you are inside a form.

That is what I also suspect, because I am on form screen, it may not be allowing me to do it.

> [@Jeff\_Hager](#):
>
> But I think I would just use a choice component instead

That’s exactly I did after trying many other variations.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/b/8bf31f10cadb45526ab083bce0b562c846fff224.png)
