# How to use runClientActions() events?

**URL:** <https://forum.inductiveautomation.com/t/how-to-use-runclientactions-events/85683>\
**Category:** Module Development\
**Created:** [February 14, 2024, 2:08pm UTC](https://forum.inductiveautomation.com/t/how-to-use-runclientactions-events/85683 "2024-02-14T14:08:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Md\_Sabbir\_Ahamed](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/md_sabbir_ahamed/32/54273_2.png) [@Md\_Sabbir\_Ahamed](https://forum.inductiveautomation.com/u/Md_Sabbir_Ahamed)\
**Post date:** [February 14, 2024, 2:08pm UTC](https://forum.inductiveautomation.com/t/how-to-use-runclientactions-events/85683/1 "2024-02-14T14:08:01Z")

</div>

Can someone explain the purpose of this function and provide an example of how to use it?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/9/69eaf8018a2e79a9bcd68ba5d77dd4dfe07be322.png)  
I am familiar with using the fireComponentEvent method, but I am unsure about how to use the runClientActions() method.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 14, 2024, 2:59pm UTC](https://forum.inductiveautomation.com/t/how-to-use-runclientactions-events/85683/2 "2024-02-14T14:59:08Z")

</div>

~~It's the inverse of fireComponentEvents.  
If you have business logic or a custom script method or something _on the backend_, you can fire a message over the bus and catch it on the _frontend_ in order to do something in your component.~~

This was wrong; there's other patterns to do this more directly.

---

<div class="post-metadata">

**Author:** ![Md\_Sabbir\_Ahamed](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/md_sabbir_ahamed/32/54273_2.png) [@Md\_Sabbir\_Ahamed](https://forum.inductiveautomation.com/u/Md_Sabbir_Ahamed)\
**Post date:** [February 14, 2024, 4:42pm UTC](https://forum.inductiveautomation.com/t/how-to-use-runclientactions-events/85683/3 "2024-02-14T16:42:19Z")

</div>

Now I know this is the inverse of fireComponentEvents. Can anyone give me an example with code?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 14, 2024, 5:26pm UTC](https://forum.inductiveautomation.com/t/how-to-use-runclientactions-events/85683/4 "2024-02-14T17:26:32Z")

</div>

Actually... I don't think you ever really need to worry about or implement it yourself. I think it's more of an internal plumbing mechanism.

---

<div class="post-metadata">

**Author:** ![Md\_Sabbir\_Ahamed](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/md_sabbir_ahamed/32/54273_2.png) [@Md\_Sabbir\_Ahamed](https://forum.inductiveautomation.com/u/Md_Sabbir_Ahamed)\
**Post date:** [February 14, 2024, 5:36pm UTC](https://forum.inductiveautomation.com/t/how-to-use-runclientactions-events/85683/5 "2024-02-14T17:36:44Z")

</div>

Thanks, Paul. At this moment, Just for learning purposes only. 😀 😀

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 14, 2024, 5:52pm UTC](https://forum.inductiveautomation.com/t/how-to-use-runclientactions-events/85683/6 "2024-02-14T17:52:12Z")

</div>

So, if you implement `ComponentStoreDelegate` you'll notice there's `fireEvent` and `handleEvent` methods; those are basically what I was thinking about when I mentioned the backend and frontend sending events to and fro.

The `runClientActions` hook appears to only be called if you have _actions_ (as in, these guys: [Component Events and Actions - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Component+Events+and+Actions#ComponentEventsandActions-ActionSettingReference)) that will be run on the "client" (the actual frontend browser session) but the gateway needs to invoke those, for whatever reason. As far as I can tell from the code, that's only potentially going to happen during component startup and shutdown?
