# Perspective button - write to indirect tag

**URL:** <https://forum.inductiveautomation.com/t/perspective-button-write-to-indirect-tag/22749>\
**Category:** Ignition Early Access\
**Created:** [February 21, 2019, 4:50am UTC](https://forum.inductiveautomation.com/t/perspective-button-write-to-indirect-tag/22749 "2019-02-21T04:50:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ASF](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ASF](https://forum.inductiveautomation.com/u/ASF)\
**Post date:** [February 21, 2019, 9:17am UTC](https://forum.inductiveautomation.com/t/perspective-button-write-to-indirect-tag/22749/2 "2019-02-21T09:17:33Z")

</div>

Somehow I didn't manage to find it in my searches earlier today, but I've just found this thread asking almost the same question, which has the solution.

> [@Referencing view parameters in perspective via scripting](http://forum.inductiveautomation.com/t/referencing-view-parameters-in-perspective-via-scripting/21115/2):
>
> While you are able to use system.tag.write() in perspective, you should use system.tag.writeAsync() as system.tag.write() is essentially deprecated (in your script type out “system.tag.” then hold Ctrl and tap Space to see available methods). Assuming self.parent.parent indeed refers to the View, then you should try one of two ways (which should both do the same thing): str(self.parent.parent.params.MotorNumber) or str(self.view.params.MotorNumber) Option 2 will remove the potential issue…

`system.tag.writeAsync([self.view.params.tagPath + '/Start'], [1])` should do the trick, I think. I'll try it in the morning.

Still interested to hear if anyone has a simpler way of doing indirect tag addressing on a button 🙂

(edited to add square brackets, as required for `system.tag.writeAsync()` function

---

_[View the full topic](https://forum.inductiveautomation.com/t/perspective-button-write-to-indirect-tag/22749)._
