# How to bind a component to tags dynamically?

**URL:** <https://forum.inductiveautomation.com/t/how-to-bind-a-component-to-tags-dynamically/86844>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 5, 2024, 6:20pm UTC](https://forum.inductiveautomation.com/t/how-to-bind-a-component-to-tags-dynamically/86844 "2024-03-05T18:20:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben522326](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@Ben522326](https://forum.inductiveautomation.com/u/Ben522326)\
**Post date:** [March 5, 2024, 6:20pm UTC](https://forum.inductiveautomation.com/t/how-to-bind-a-component-to-tags-dynamically/86844/1 "2024-03-05T18:20:07Z")

</div>

Hello! I'm new to ignition and haven't been able to find exactly what I'm looking for so figured I'd ask here....

I have a table that contains a list of machines that is populated by an API call. In this table I have an onRowClick script that opens a popup window to display further details about the selected row. I created view params in the popup to pass the selected row info to the popup so that it can dynamically display the details.

I have some tags that reflect an online status about each machine in the table. I want to add a toggle switch that reflects the value of the Boolean tag to the popup. How can I dynamically bind the toggle's 'selected' value to its corresponding tag when the row is clicked?

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 5, 2024, 6:25pm UTC](https://forum.inductiveautomation.com/t/how-to-bind-a-component-to-tags-dynamically/86844/2 "2024-03-05T18:25:28Z")

</div>

Use an indirect tag binding on the toggle switch and send the tagPath(s) to the popup as params. Or some similar part of the path that uniquely identifies the tag(s) for each machine/row

> **[Tag Bindings in Perspective | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/working-with-perspective-components/bindings-in-perspective/tag-bindings-in-perspective#indirect-tag-binding-mode)**
>
> A Tag binding is a straight-forward binding type. It simply binds a property directly to a Tag Property (typically the value). This sets up a subscription for that Tag. Every time the chosen Tag changes, the binding is evaluated and pushes the new...
