# Associate functions to buttons via parameters

**URL:** <https://forum.inductiveautomation.com/t/associate-functions-to-buttons-via-parameters/105276>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 18, 2025, 8:26am UTC](https://forum.inductiveautomation.com/t/associate-functions-to-buttons-via-parameters/105276 "2025-04-18T08:26:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![g.ferrario](https://avatars.discourse-cdn.com/v4/letter/g/9de0a6/32.png) [@g.ferrario](https://forum.inductiveautomation.com/u/g.ferrario)\
**Post date:** [April 18, 2025, 8:26am UTC](https://forum.inductiveautomation.com/t/associate-functions-to-buttons-via-parameters/105276/1 "2025-04-18T08:26:08Z")

</div>

I have a view that I want to use in multiple ways, it's nothing more than a popup with a message and two commands, one that closes the view itself and one that I want to parameterize so that I can use it multiple times.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 18, 2025, 9:22am UTC](https://forum.inductiveautomation.com/t/associate-functions-to-buttons-via-parameters/105276/2 "2025-04-18T09:22:17Z")

</div>

- Pass a parameter containing some code or other into the popup.
- In the popup,
  - If required, add an expression binding to the button's text property to change the text.  

  - On the button event set up something like this.  

  - See [system.perspective.sendMessage | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-perspective/system-perspective-sendMessage)

- On the components or views to react to the message you need to add a [message handler](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/scripting-in-perspective/component-message-handlers). Read the doc and watch the video.

---

<div class="post-metadata">

**Author:** ![g.ferrario](https://avatars.discourse-cdn.com/v4/letter/g/9de0a6/32.png) [@g.ferrario](https://forum.inductiveautomation.com/u/g.ferrario)\
**Post date:** [April 18, 2025, 9:49am UTC](https://forum.inductiveautomation.com/t/associate-functions-to-buttons-via-parameters/105276/3 "2025-04-18T09:49:41Z")

</div>

Thank you i will try it
