# Action: If this then that issue

**URL:** https://community.glideapps.com/t/action-if-this-then-that-issue/73491
**Category:** Ask for Help
**Created:** [May 19, 2024, 3:52pm UTC](https://community.glideapps.com/t/action-if-this-then-that-issue/73491 "2024-05-19T15:52:24Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Nathan\_M](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathan_m/32/43901_2.png) [@Nathan\_M](https://community.glideapps.com/u/Nathan_M)
#### Post date: [May 19, 2024, 3:52pm UTC](https://community.glideapps.com/t/action-if-this-then-that-issue/73491/1 "2024-05-19T15:52:24Z")

</div>

Hi all,

Please see the below flow and advise what I am doing wrong?

Currently, when I execute an “add to cart” button, it’s creating two identical line items in the table (so it’s exciting both functions) and I dont know why.

Any advice?

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

---

<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 19, 2024, 4:54pm UTC](https://community.glideapps.com/t/action-if-this-then-that-issue/73491/2 "2024-05-19T16:54:57Z")

</div>

It’s not possible for multiple branches of an action to be triggered.  
If you look in the run log, you will see which branch was called.

How is the action triggered?

I don’t suppose it is a Form onSubmit action, is it?

---

<div class="post-metadata">

### Author: ![Nathan\_M](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathan_m/32/43901_2.png) [@Nathan\_M](https://community.glideapps.com/u/Nathan_M)
#### Post date: [May 19, 2024, 7:11pm UTC](https://community.glideapps.com/t/action-if-this-then-that-issue/73491/3 "2024-05-19T19:11:10Z")

</div>

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

Yeah it is a form action.

---

<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 19, 2024, 8:05pm UTC](https://community.glideapps.com/t/action-if-this-then-that-issue/73491/4 "2024-05-19T20:05:37Z")

</div>

Forms already add a row when you click on the submit button. That is the purpose of a form. Any additional On Submit actions run AFTER the row had been added via the form. Sounds like you have a redundant action that is adding the same thing that the form itself is already adding.

---

<div class="post-metadata">

### Author: ![Nathan\_M](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathan_m/32/43901_2.png) [@Nathan\_M](https://community.glideapps.com/u/Nathan_M)
#### Post date: [May 19, 2024, 8:07pm UTC](https://community.glideapps.com/t/action-if-this-then-that-issue/73491/5 "2024-05-19T20:07:31Z")

</div>

That makes a lot of sense 😃 Thank!

---

<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: [May 26, 2024, 8:08pm UTC](https://community.glideapps.com/t/action-if-this-then-that-issue/73491/6 "2024-05-26T20:08:10Z")

</div>

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