# Dynamic Tag Path

**URL:** <https://forum.inductiveautomation.com/t/dynamic-tag-path/37107>\
**Category:** Ignition\
**Created:** [July 27, 2020, 1:17am UTC](https://forum.inductiveautomation.com/t/dynamic-tag-path/37107 "2020-07-27T01:17:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![craigb](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@craigb](https://forum.inductiveautomation.com/u/craigb)\
**Post date:** [July 27, 2020, 1:17am UTC](https://forum.inductiveautomation.com/t/dynamic-tag-path/37107/1 "2020-07-27T01:17:50Z")

</div>

I’m trying to create a custom tag path based on custom parameters.

The following works…

```auto
tag("[MQTT Engine]/Edge Nodes/Cabinets/BB-003/Info/Alarm")

```

The following doesn’t

```auto
tag("[MQTT Engine]/Edge Nodes/Cabinets/{view.params.id}/Info/Alarm")

```

view.params.id = BB-003

I assume I’m missing some kind of formatting but cant figure out what it is. This is for a expression on a label.

Thankyou

---

<div class="post-metadata">

**Author:** ![DSI600](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@DSI600](https://forum.inductiveautomation.com/u/DSI600)\
**Post date:** [July 27, 2020, 1:53am UTC](https://forum.inductiveautomation.com/t/dynamic-tag-path/37107/2 "2020-07-27T01:53:13Z")

</div>

You have to concatenate your tag path with the variable. Right now the whole tag path is a literal string.

tag(“firstPartOfPath/” + view.params.id + “/endOfPath”

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [July 27, 2020, 2:49am UTC](https://forum.inductiveautomation.com/t/dynamic-tag-path/37107/3 "2020-07-27T02:49:51Z")

</div>

Yes. If this is for a binding, consider using an indirect binding instead of the tag expression for better performance.

---

<div class="post-metadata">

**Author:** ![craigb](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@craigb](https://forum.inductiveautomation.com/u/craigb)\
**Post date:** [July 27, 2020, 4:34pm UTC](https://forum.inductiveautomation.com/t/dynamic-tag-path/37107/4 "2020-07-27T16:34:09Z")

</div>

Indirect Tag did the trick…

```auto
[MQTT Engine]Edge Nodes/Cabinets/{Serial}/Info/Device Info/Last Data Message Size

```

Then you define {Serial} in the property box underneath.
