# How to pass tags into a popup perspective

**URL:** <https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [January 24, 2023, 5:50am UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950 "2023-01-24T05:50:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandon222](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@brandon222](https://forum.inductiveautomation.com/u/brandon222)\
**Post date:** [January 24, 2023, 5:50am UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/1 "2023-01-24T05:50:36Z")

</div>

Hi there,

So I have become very good at using Ignition with Visions and now I am transitioning to perspectives. I understand mostly how they work. However, I am used to in the vIsions I can create templates of say a valve and when the users clicks it a popup shows up and is populated using a UDT so that making multiple valves is quick and easy. I understand how to make popups but how would I go abouts passing say a UDT that has lets say a string, int. And make this dynamic so I can use it multiple times. I've gone through the perspective university videos but nothing really talks about passing tags over.

EDIT:

I think I figured it out. I am assuming I have to use the custom property and just pass each tag individually instead of a udt?

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [January 24, 2023, 6:32am UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/2 "2023-01-24T06:32:26Z")

</div>

I've never used Vision, but I usually pass the UDT's path and bind indirectly in the popup.

---

<div class="post-metadata">

**Author:** ![brandon222](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@brandon222](https://forum.inductiveautomation.com/u/brandon222)\
**Post date:** [January 24, 2023, 6:59am UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/3 "2023-01-24T06:59:29Z")

</div>

Where abouts would you do that?

> ![](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/0/d0d61ab1ed539c1dafed3e8a676e36986764d6b8.png "nideyijuyidong") | [nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)  
> January 24 |
> 
> - | - |

I've never used Vision, but I usually pass the UDT's path and bind indirectly in the popup.

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [January 24, 2023, 7:15am UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/4 "2023-01-24T07:15:06Z")

</div>

[https://docs.inductiveautomation.com/display/DOC81/Popup+Views](https://docs.inductiveautomation.com/display/DOC81/Popup+Views)  
For diffirent valves,pass a diffirent UDT path, then use the params in popup page.

---

<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:** [January 24, 2023, 4:21pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/5 "2023-01-24T16:21:19Z")

</div>

Vision's UDT-type parameters basically couldn't be brought over to Perspective's JSON-centric world, so they weren't brought over wholesale to Perspective. The generally preferred pattern is to pass a tagpath string, and use indirect bindings over well known tag paths. This is actually a bit _more_ flexible than Vision's UDT bindings, since two UDTs just have to be _structurally_ similar (i.e. following the same folder and naming convention) to be used by the same "template" view.

---

<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:** [January 24, 2023, 4:31pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/6 "2023-01-24T16:31:18Z")

</div>

> [@paul-griffith](#):
>
> This is actually a bit _more_ flexible than Vision's UDT bindings, since two UDTs just have to be _structurally_ similar (i.e. following the same folder and naming convention) to be used by the same "template" view.

And it is precisely why I always argue against using UDT properties in Vision, either.

---

<div class="post-metadata">

**Author:** ![brandon222](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@brandon222](https://forum.inductiveautomation.com/u/brandon222)\
**Post date:** [January 24, 2023, 4:53pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/7 "2023-01-24T16:53:45Z")

</div>

Sorry do you have an example of this?

---

<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:** [January 24, 2023, 5:09pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/8 "2023-01-24T17:09:32Z")

</div>

There's not much to demonstrate as an example, really.  
Make one view. Give it a parameter named 'tagpath' (or whatever) and make it an input parameter.  
Put a label or something else on the view, use an indirect binding to bind to `{self.view.params.text}/SomeTagInTheUDT`.

Then create a containing view, and use an embedded view, or a flex repeater, or whatever other component you want, to instantiate the 'child' view and set the `tagpath` parameter to the path to your tag. The indirect tag binding should automatically pick up and start working.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [January 24, 2023, 5:22pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/9 "2023-01-24T17:22:50Z")

</div>

Expanding on the example from @paul-griffith , you would then open a Popup in the following manner:

```auto
system.perspective.openPopup(id="SomeUniqueValue", view="MyView", params={"tagpath": "pathToUdt"})

```

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [January 24, 2023, 6:48pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/10 "2023-01-24T18:48:46Z")

</div>

> **[Ignition Exchange](https://inductiveautomation.com/exchange/2231/overview)**
>
> Discover, share, and download community made Ignition resources in collaboration with your organization or the Ignition community.

Hi @brandon222  
Even if you don't need the ressource you can find in there how to link tag to a faceplate and from in this faceplate call a popup with input parameters.

Regards

---

<div class="post-metadata">

**Author:** ![brandon222](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@brandon222](https://forum.inductiveautomation.com/u/brandon222)\
**Post date:** [January 24, 2023, 7:50pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/11 "2023-01-24T19:50:59Z")

</div>

Ok thank you all I think I figured it out. However, I have one other question. How do I get the page to refresh as data updates. For instance when I pass an int over for a CylindricalTank it works fine and show the percentage. But when and change the value of the tag it doesn't update on the screen.

---

<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:** [January 24, 2023, 7:54pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/12 "2023-01-24T19:54:17Z")

</div>

That's what you get when you pass a value. To get updates, the receiving view needs to have a binding. That's why you should pass a tagpath--so the view can **bind** to the source instead of getting a snapshot of the source.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [January 24, 2023, 7:57pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/13 "2023-01-24T19:57:00Z")

</div>

As @pturmel said: You're passing an un-changing param value. If you need some UI to update based on changes, then you need to use that value to create a binding. This is a good example of why you should pass a reference to what stores your value rather than the value itself.

---

<div class="post-metadata">

**Author:** ![brandon222](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@brandon222](https://forum.inductiveautomation.com/u/brandon222)\
**Post date:** [January 24, 2023, 8:01pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/14 "2023-01-24T20:01:38Z")

</div>

I'm sorry is there anyway you can show this to me in a screenshot or something. I'm very big visual learner so that would help me understand it properly. I'm sorry

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [January 24, 2023, 10:28pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/15 "2023-01-24T22:28:30Z")

</div>

Get ready for a weird analogy.  
Think of a tag path and its value as a person and their weight.  
If you ask for someone's weight, they (might) give you a value at that date and time.  
If you assume in 10 years that their weight is still the same, you will most likely be wrong; you need to ask them again.  
However, if you instead know the person's name (their ID) and there's a global database of people with up-to-date info on their weights, then you can find out that person's current weight since you know their name/id.

You need to pass the person's name (the path to the tag) to the popup, not its value. Then in the popup you need to use an indirect tag binding that uses the tag path you pass in.

---

<div class="post-metadata">

**Author:** ![brandon222](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@brandon222](https://forum.inductiveautomation.com/u/brandon222)\
**Post date:** [January 24, 2023, 10:32pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/16 "2023-01-24T22:32:40Z")

</div>

Thank you for that analogy makes perfect sense. My problem is I don't know where abouts I would put that information into the perspective screens.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [January 24, 2023, 10:34pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/17 "2023-01-24T22:34:27Z")

</div>

> [@paul-griffith](#):
>
> Vision's UDT-type parameters basically couldn't be brought over to Perspective's JSON-centric world, so they weren't brought over wholesale to Perspective

I never used UDTType params in Vision either, which meant I couldn't use the drag/drop UDT Instance onto Window to auto add Templates either. But I've always wondered if similar drag/drop functionality made it into Perspective? In a different form, obviously since UDT type params don't exist.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [January 24, 2023, 10:59pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/18 "2023-01-24T22:59:50Z")

</div>

Here's a super simple example:  
[UDT Popup Test.zip](https://forum.inductiveautomation.com/uploads/short-url/bOe43sIpbiTBYBXPkXfaycvHL6m.zip) (8.6 KB)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/c/acff5cc121b1a5dc0a633b0d8b9865f7c1123bb7.png)

The button opens the popup, passing in a `deviceParentPath` and `deviceName`. These should make up the path to the UDT instance, where they're combined in the popup into a custom param `deviceTagPath` as: `{deviceParentPath}/{deviceName}`  
So for example, if the path to your UDT instance is: `area/sub area/pump 1`, then you should pass in the params like this:  
`deviceParentPath: 'area/sub area'`  
`deviceName: 'pump 1'`

The popup then displays a "Status" tag which is part of the UDT Instance using an indirect tag binding:  
`{deviceTagPath}/Status`

Notes:  
The reason I pass in deviceParentPath and deviceName instead of just deviceTagPath, is:

- for simplicity of populating these within the embedded view's params since you can then set the parent path for multiple objects which are all in the same folder
- the property window cuts off long strings, and the deviceName is the most important part. If the full path was copied in instead of splitting these up, then the device name would most likely be cut off in the display
- it makes it easy to display the device name in the popup

---

<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:** [January 24, 2023, 11:15pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/19 "2023-01-24T23:15:38Z")

</div>

> [@nminchin](#):
>
> But I've always wondered if similar drag/drop functionality made it into Perspective?

Not exactly. There's a customizable (but somewhat obscure) way to set up your own component bindings easily, but only for native data types:  
[https://docs.inductiveautomation.com/display/DOC81/Perspective+Project+Properties#PerspectiveProjectProperties-PerspectiveTagDropProperties](https://docs.inductiveautomation.com/display/DOC81/Perspective+Project+Properties#PerspectiveProjectProperties-PerspectiveTagDropProperties)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [January 24, 2023, 11:25pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950/20 "2023-01-24T23:25:24Z")

</div>

> [@paul-griffith](#):
>
> native data types

I did see these in the project settings, and it looked ok, but I very rarely drag tags directly onto the page to create the graphics for them, so it's not all that useful for me personally. It would be useful to be able to do something like this for UDT instances though. All of my device template Views have a deviceParentPath and deviceName, so it would be nice to be able to specify a list of UDT types to apply auto mappings to.

[Next page](https://forum.inductiveautomation.com/t/how-to-pass-tags-into-a-popup-perspective/68950.md?page=2)
