# Current tag name from Vision Client tag expression

**URL:** <https://forum.inductiveautomation.com/t/current-tag-name-from-vision-client-tag-expression/55802>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [February 6, 2022, 11:48pm UTC](https://forum.inductiveautomation.com/t/current-tag-name-from-vision-client-tag-expression/55802 "2022-02-06T23:48:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![francis.rainville](https://avatars.discourse-cdn.com/v4/letter/f/e8c25b/32.png) [@francis.rainville](https://forum.inductiveautomation.com/u/francis.rainville)\
**Post date:** [February 6, 2022, 11:48pm UTC](https://forum.inductiveautomation.com/t/current-tag-name-from-vision-client-tag-expression/55802/1 "2022-02-06T23:48:01Z")

</div>

Hi,  
I’m looking for a way, from a Vision Client tag (not a UDT), to get an expression that will return the current tag name (or the current tag path from where I can easily get the tag name).

I will use this expression (that return the tag name) inside another expression that will return a value based on this tag name. The goal is to be able to copy/paste a lot of tags and only have to take care of the tag name without having to change the expression each time.

Thanks

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [February 7, 2022, 3:45pm UTC](https://forum.inductiveautomation.com/t/current-tag-name-from-vision-client-tag-expression/55802/2 "2022-02-07T15:45:52Z")

</div>

Can you post pseudo-code to give a better idea of your desired finished project?

---

<div class="post-metadata">

**Author:** ![ajdewhirst1](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@ajdewhirst1](https://forum.inductiveautomation.com/u/ajdewhirst1)\
**Post date:** [February 7, 2022, 4:22pm UTC](https://forum.inductiveautomation.com/t/current-tag-name-from-vision-client-tag-expression/55802/3 "2022-02-07T16:22:45Z")

</div>

Try this:

{[~]CurrentTagName.Path}

Replace “CurrentTagName” with the name of your tag.

---

<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:** [February 7, 2022, 4:27pm UTC](https://forum.inductiveautomation.com/t/current-tag-name-from-vision-client-tag-expression/55802/4 "2022-02-07T16:27:11Z")

</div>

> [@ajdewhirst1](#):
>
> Replace “CurrentTagName” with the name of your tag.

Heh. That's the part the OP wants to extract.

---

<div class="post-metadata">

**Author:** ![ajdewhirst1](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@ajdewhirst1](https://forum.inductiveautomation.com/u/ajdewhirst1)\
**Post date:** [February 7, 2022, 4:40pm UTC](https://forum.inductiveautomation.com/t/current-tag-name-from-vision-client-tag-expression/55802/5 "2022-02-07T16:40:18Z")

</div>

Next time, I should probably drink more coffee before I try and help someone 😄  
Probably needs a UDT to access the whole {PathToTag} stuff.

---

<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:** [February 7, 2022, 5:05pm UTC](https://forum.inductiveautomation.com/t/current-tag-name-from-vision-client-tag-expression/55802/6 "2022-02-07T17:05:22Z")

</div>

> [@ajdewhirst1](#):
>
> Probably needs a UDT

Heh. Vision Client Tags don't support UDTs. More coffee?

---

<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:** [February 7, 2022, 5:31pm UTC](https://forum.inductiveautomation.com/t/current-tag-name-from-vision-client-tag-expression/55802/7 "2022-02-07T17:31:16Z")

</div>

BTW, if one were to use my `objectScript` expression function, and use java reflection on the `binding`, one might find interesting things.

No further hint from me, as the only practical use would be feeding a variation on the name to the `tag()` expression function. Which is just _ **wrong** _.
