# Click Action Buttons with an Action Button?

**URL:** <https://community.fibery.io/t/click-action-buttons-with-an-action-button/1170>\
**Category:** API & Programming\
**Created:** [November 15, 2020, 12:35am UTC](https://community.fibery.io/t/click-action-buttons-with-an-action-button/1170 "2020-11-15T00:35:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![aprotasenya](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/aprotasenya/32/1221_2.png) [@aprotasenya](https://community.fibery.io/u/aprotasenya)\
**Post date:** [November 15, 2020, 12:35am UTC](https://community.fibery.io/t/click-action-buttons-with-an-action-button/1170/1 "2020-11-15T00:35:06Z")

</div>

Just for the sake of logic organisation (and not having the same code in several places) – is it possible to “click” an Action Button from the script of another Action Button? Call it like a method? Since it is created like a field, I figured it should also be accessible from the script like one?

Simple use case: suppose both tasks and subtasks have an “Assign to me” button. By clicking “Assign to me” on a task can I auto-click “Assign to me” on every connected subtask?

If yes, please help me with the syntax for that 'cause I won’t be able to figure it out myself (I don’t know any JS 😬).

Thanks!

---

<div class="post-metadata">

**Author:** ![Polina\_Zenevich](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/polina_zenevich/32/480_2.png) [@Polina\_Zenevich](https://community.fibery.io/u/Polina_Zenevich)\
**Post date:** [November 16, 2020, 12:55pm UTC](https://community.fibery.io/t/click-action-buttons-with-an-action-button/1170/2 "2020-11-16T12:55:53Z")

</div>

Hi!  
Unfortunately, there is no good way to do that ☹

---

<div class="post-metadata">

**Author:** ![aprotasenya](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/aprotasenya/32/1221_2.png) [@aprotasenya](https://community.fibery.io/u/aprotasenya)\
**Post date:** [November 16, 2020, 1:44pm UTC](https://community.fibery.io/t/click-action-buttons-with-an-action-button/1170/3 "2020-11-16T13:44:58Z")

</div>

Oh. I see.  
Is there a nasty way to do it? 😏

Пн, 16 нояб. 2020 г. в 15:06, Polina Zenevich via Fibery Community \<[fibery@discoursemail.com](mailto:fibery@discoursemail.com)\>:

---

<div class="post-metadata">

**Author:** ![Polina\_Zenevich](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/polina_zenevich/32/480_2.png) [@Polina\_Zenevich](https://community.fibery.io/u/Polina_Zenevich)\
**Post date:** [November 16, 2020, 2:11pm UTC](https://community.fibery.io/t/click-action-buttons-with-an-action-button/1170/4 "2020-11-16T14:11:12Z")

</div>

> [@aprotasenya](#):
>
> Simple use case: suppose both tasks and subtasks have an “Assign to me” button. By clicking “Assign to me” on a task can I auto-click “Assign to me” on every connected subtask?

So, instead, I can suggest you a button, that will not click action buttons inside children entities, but that will go through all child entities and will assign the one, who clicked on the button on the parent entity.  
That will work.  
Unfortunately, for now, we can’t write the whole code, but you can use that ready templates 🙂

1. Assign to me - [assign-to-me · master · fibery-community / Action Buttons · GitLab](https://gitlab.com/fibery-community/action-buttons/-/tree/master/assign-to-me) - to get how to fill in Assignee
2. Close task and subtasks - [close-task-and-all-subtasks · master · fibery-community / Action Buttons · GitLab](https://gitlab.com/fibery-community/action-buttons/-/tree/master/close-task-and-all-subtasks) - this code allows to change State, and you have to customize it and make not change State, but fill in Assignee.

Hope that helps 🙂

---

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [February 15, 2022, 8:36pm UTC](https://community.fibery.io/t/click-action-buttons-with-an-action-button/1170/5 "2022-02-15T20:36:59Z")

</div>

@Polina,

How then would you suggest to implement this:

I am modeling a Workflow where I have “Step” entities for the various steps in the Workflow.  
Each Step has a collection of “Action” entities that each define an action to take for the “Step”.  
When a Step is marked Done (a Button), it must trigger each of its Action entities to take its action, which is also a Button/Rule.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [February 16, 2022, 8:39am UTC](https://community.fibery.io/t/click-action-buttons-with-an-action-button/1170/6 "2022-02-16T08:39:26Z")

</div>

You could have a checkbox field in the Action and define an automation rule that triggers when it is checked (and clears it afterwards).  
Then you can have have a ‘Done’ button for the Step that will set the value of the checkbox of all its child Actions to checked.

---

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [February 16, 2022, 5:10pm UTC](https://community.fibery.io/t/click-action-buttons-with-an-action-button/1170/7 "2022-02-16T17:10:11Z")

</div>

That’s basically what I came up with – it is nearly the duplicate of a Button, but a “Button” looks nicer and makes more sense for an “Action”, so why can we not just allow the Rules/Scripts to trigger Buttons??

---

<div class="post-metadata">

**Author:** ![Oleg](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/oleg/32/1887_2.png) [@Oleg](https://community.fibery.io/u/Oleg)\
**Post date:** [February 21, 2022, 3:43pm UTC](https://community.fibery.io/t/click-action-buttons-with-an-action-button/1170/8 "2022-02-21T15:43:58Z")

</div>

Hi, @aprotasenya

That’s a really good idea. Will think about it.

Thanks,  
Oleg
