# Can a script resolve a tag that was directly bound to a parameter?

**URL:** <https://forum.inductiveautomation.com/t/can-a-script-resolve-a-tag-that-was-directly-bound-to-a-parameter/59551>\
**Category:** General Discussion\
**Tags:** ignition81, scripting, perspective\
**Created:** [May 13, 2022, 4:47pm UTC](https://forum.inductiveautomation.com/t/can-a-script-resolve-a-tag-that-was-directly-bound-to-a-parameter/59551 "2022-05-13T16:47:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [May 13, 2022, 4:47pm UTC](https://forum.inductiveautomation.com/t/can-a-script-resolve-a-tag-that-was-directly-bound-to-a-parameter/59551/1 "2022-05-13T16:47:33Z")

</div>

Given a Perspective View that that has a View Parameter VP on it, can a script somewhere within that view inspect the VP and retrieve details of the type (if any) binding attached to that parameter?

And if so, could script the determine if the binding was a Direct Tag Binding and extract the full path to the tag?

And from knowing the path, then query the GW in order to extract the server connection and OPC Item path of that tag?

* * *

As per @pturmel suggestion [here](https://forum.inductiveautomation.com/t/how-best-to-optimize-for-real-time-jog-buttons/59518/12) the [system.opc.writeValue()](https://docs.inductiveautomation.com/display/DOC81/system.opc.writeValue) call appears to solve my issues. But this call requires knowledge of the exact OPC server and item path to the variable in the PLC. However, for ease of use I’d still like to bind a variable to my momentary button and extract that information automatically.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 13, 2022, 4:49pm UTC](https://forum.inductiveautomation.com/t/can-a-script-resolve-a-tag-that-was-directly-bound-to-a-parameter/59551/2 "2022-05-13T16:49:29Z")

</div>

Consider passing a tag path to the view instead of binding directly. Then you don’t need any particular gyrations.

---

<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:** [May 13, 2022, 4:50pm UTC](https://forum.inductiveautomation.com/t/can-a-script-resolve-a-tag-that-was-directly-bound-to-a-parameter/59551/3 "2022-05-13T16:50:15Z")

</div>

> [@peter](#):
>
> can a script somewhere within that view inspect the VP and retrieve details of the type (if any) binding attached to that parameter?

No.

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [May 13, 2022, 4:51pm UTC](https://forum.inductiveautomation.com/t/can-a-script-resolve-a-tag-that-was-directly-bound-to-a-parameter/59551/4 "2022-05-13T16:51:06Z")

</div>

But then I can’t bind the tag itself to various animations in the control - thus needing gyrations (or duplications) there

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 13, 2022, 4:57pm UTC](https://forum.inductiveautomation.com/t/can-a-script-resolve-a-tag-that-was-directly-bound-to-a-parameter/59551/5 "2022-05-13T16:57:39Z")

</div>

No, just indirect bind the tag via the tagpath **within** the view.
