# Alarm pipeline binding

**URL:** <https://forum.inductiveautomation.com/t/alarm-pipeline-binding/45871>\
**Category:** Ignition\
**Created:** [April 21, 2021, 4:34pm UTC](https://forum.inductiveautomation.com/t/alarm-pipeline-binding/45871 "2021-04-21T16:34:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pat\_Schmidt](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@Pat\_Schmidt](https://forum.inductiveautomation.com/u/Pat_Schmidt)\
**Post date:** [April 21, 2021, 4:34pm UTC](https://forum.inductiveautomation.com/t/alarm-pipeline-binding/45871/1 "2021-04-21T16:34:02Z")

</div>

We have setup alarms on some of our UDT tags and reuse these UDTs from project to project. These alarms always call the same active pipeline name and we use the same pipeline name on all projects.

On each project we have to go into the UDTs and change the pipeline because the path includes the project name and our project names are different. So I am looking into binding the pipeline so it will dynamically include the project name.

I can bind the Active Pipeline to **runScript(“system.util.getProjectName”)+’/pipeline name’**

My question is would this be a good idea? I’m not sure how often the runScript function would be called. If it’s called at the scan class rate, for every alarm in every UDT instance, it seems like this would be an unnecessary burden on the gateway.

Just looking for suggestions.  
Thanks

---

<div class="post-metadata">

**Author:** ![tnichols](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tnichols/32/73331_2.png) [@tnichols](https://forum.inductiveautomation.com/u/tnichols)\
**Post date:** [December 20, 2021, 6:22pm UTC](https://forum.inductiveautomation.com/t/alarm-pipeline-binding/45871/2 "2021-12-20T18:22:41Z")

</div>

I have a similar situation and am curious if a good solution was found.

In my testing, **runScript(“system.util.getProjectName”)+’/pipeline name’** did not work. Tags are in the Gateway and not project-specific.

What did work is **runScript(“system.project.getProjectNames()[0]”)+’/pipeline name’**. This is not ideal though. It works if you have only one project on your gateway, but not if you have multiple projects and the project you want is not first in the list.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [December 20, 2021, 7:37pm UTC](https://forum.inductiveautomation.com/t/alarm-pipeline-binding/45871/3 "2021-12-20T19:37:23Z")

</div>

Use `system.util.getProjectName()` on a `session.custom` property, and reference this in your binding.

---

<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:** [December 20, 2021, 7:39pm UTC](https://forum.inductiveautomation.com/t/alarm-pipeline-binding/45871/4 "2021-12-20T19:39:25Z")

</div>

> [@pascal.fragnoud](#):
>
> `system.util.getProjectName()` should work.

Why do you think that? Tags aren't in projects. Pipelines are, but this binding is in the tag.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [December 20, 2021, 7:43pm UTC](https://forum.inductiveautomation.com/t/alarm-pipeline-binding/45871/5 "2021-12-20T19:43:53Z")

</div>

Sorry, I didn’t mean that it should work on the tag, just that it should work to get the project name on a `session.custom` prop, which I suggest afterward. I’ll rephrase my post, I admit it’s a bit confusing

---

<div class="post-metadata">

**Author:** ![tnichols](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tnichols/32/73331_2.png) [@tnichols](https://forum.inductiveautomation.com/u/tnichols)\
**Post date:** [December 20, 2021, 8:33pm UTC](https://forum.inductiveautomation.com/t/alarm-pipeline-binding/45871/6 "2021-12-20T20:33:04Z")

</div>

Admittedly, I am not familiar with session custom properties, but this sounds like it would make my alarm’s active pipeline binding dependent on Perspective. I would rather the solution not be dependent on the HMI, whether Vision or Perspective.

In principle, I should be able to make a project with only an alarm notification pipeline in it (no Vision or Perspective) and reference the active pipeline for all of my alarms to it. That may be a solution, albeit not an elegant one. If every gateway included a project with the same name which only contained an alarm notification pipeline, then I would not have to change my UDT definitions from gateway to gateway.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 20, 2021, 8:43pm UTC](https://forum.inductiveautomation.com/t/alarm-pipeline-binding/45871/7 "2021-12-20T20:43:10Z")

</div>

> [@tnichols](#):
>
> In principle, I should be able to make a project with only an alarm notification pipeline in it (no Vision or Perspective) and reference the active pipeline for all of my alarms to it. That may be a solution, albeit not an elegant one. If every gateway included a project with the same name which only contained an alarm notification pipeline, then I would not have to change my UDT definitions from gateway to gateway.

This is actually how we handle 7.9 -\> 8.x upgrades… Alarm Pipelines were previously defined in the “global” project and on upgrade get moved to a single “alarm-pipelines” project.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [December 21, 2021, 1:26pm UTC](https://forum.inductiveautomation.com/t/alarm-pipeline-binding/45871/8 "2021-12-21T13:26:33Z")

</div>

> [@tnichols](#):
>
> Admittedly, I am not familiar with session custom properties, but this sounds like it would make my alarm’s active pipeline binding dependent on Perspective. I would rather the solution not be dependent on the HMI, whether Vision or Perspective.

You're right, I was talking non-sense.  
In our setup, we have one remote tag provider per project, and a tag with the project name is configured there. This may work if you have a similar setup, but if several projects use the same provider then you'll need something else.

---

<div class="post-metadata">

**Author:** ![tnichols](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tnichols/32/73331_2.png) [@tnichols](https://forum.inductiveautomation.com/u/tnichols)\
**Post date:** [December 21, 2021, 4:23pm UTC](https://forum.inductiveautomation.com/t/alarm-pipeline-binding/45871/9 "2021-12-21T16:23:39Z")

</div>

We have multiple projects on the same gateway with the same standard tag provider. Here is what I have come up with…

Within the Tag Browser, have one folder for each project. The names of these top-level folders match the names of the projects. For alarms, bind the Active Pipeline to `split({PathToTag}, '/')[0,0] + '/pipeline name'`.
