# Calling Custom Method via runScript on a Template

**URL:** <https://forum.inductiveautomation.com/t/calling-custom-method-via-runscript-on-a-template/42906>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [February 2, 2021, 6:56pm UTC](https://forum.inductiveautomation.com/t/calling-custom-method-via-runscript-on-a-template/42906 "2021-02-02T18:56:00Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![pdc5067](https://avatars.discourse-cdn.com/v4/letter/p/c6cbf5/32.png) [@pdc5067](https://forum.inductiveautomation.com/u/pdc5067)\
**Post date:** [February 2, 2021, 7:50pm UTC](https://forum.inductiveautomation.com/t/calling-custom-method-via-runscript-on-a-template/42906/4 "2021-02-02T19:50:38Z")

</div>

> [@Binding to Custom Component Methods](http://forum.inductiveautomation.com/t/binding-to-custom-component-methods/19245/2):
>
> Yes, it is possible to use runScript with custom functions (in certain circumstances). Mirroring what was described in your first link, I added a text field that accepts \*args, and just returns them as a string: Then, I added a runScript binding using self: runScript("self.printArgs", 0, {Root Container.Text Field.text}, {Root Container.Text Field 1.text}, {Root Container.Text Field 2.text})

This Forum Thread makes mention of the runScript() expression function creating unexpected behavior in templates. Im not sure if that's what is going on here or if there is a work around..

---

_[View the full topic](https://forum.inductiveautomation.com/t/calling-custom-method-via-runscript-on-a-template/42906)._
