# Alarm Binding dataset to Display Path in expression

**URL:** <https://forum.inductiveautomation.com/t/alarm-binding-dataset-to-display-path-in-expression/82321>\
**Category:** Ignition\
**Created:** [November 24, 2023, 8:13am UTC](https://forum.inductiveautomation.com/t/alarm-binding-dataset-to-display-path-in-expression/82321 "2023-11-24T08:13:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [November 24, 2023, 8:13am UTC](https://forum.inductiveautomation.com/t/alarm-binding-dataset-to-display-path-in-expression/82321/1 "2023-11-24T08:13:53Z")

</div>

Hi,  
I was wondering if it is possible to pass a dataset with strings to an alarm label expression and then point to a certain string with the parameter of that tag.  
I was trying the following but that didn't work:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/b/bba6f4c8c89b34ce3ec097c0e885ccb6e7c46f68.png)  
"AlarmTextlist" is the Textlist and "ValveNum" is the parameter.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 24, 2023, 9:16am UTC](https://forum.inductiveautomation.com/t/alarm-binding-dataset-to-display-path-in-expression/82321/2 "2023-11-24T09:16:44Z")

</div>

You can't nest `{ }` parameters.  
Have a look at the expression language `tag()` function.

---

<div class="post-metadata">

**Author:** ![sebastien\_ng](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sebastien_ng/32/55297_2.png) [@sebastien\_ng](https://forum.inductiveautomation.com/u/sebastien_ng)\
**Post date:** [November 24, 2023, 9:28am UTC](https://forum.inductiveautomation.com/t/alarm-binding-dataset-to-display-path-in-expression/82321/3 "2023-11-24T09:28:33Z")

</div>

Use function tag like #lTransistor sayed.

Exemple  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/d/dda1d31865dc2e406e8d4b903ec9b8eb3de26aa3.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/d/4d12c050892f0e21c877b796353905fb88cccec8.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 24, 2023, 10:32am UTC](https://forum.inductiveautomation.com/t/alarm-binding-dataset-to-display-path-in-expression/82321/4 "2023-11-24T10:32:12Z")

</div>

To retrieve the contents of column 1, row[{value}] use the syntax,  
`tag("[~]AlarmTextlist[1]")[{value}]`

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [November 24, 2023, 10:45am UTC](https://forum.inductiveautomation.com/t/alarm-binding-dataset-to-display-path-in-expression/82321/5 "2023-11-24T10:45:05Z")

</div>

I was trying this:

```auto
NUM = tag("[Test SCADA Ignition]Valve/Valve"+{ValveNum}+"/Stat/HmiFail/alarmText")
Lookup({[~]AlarmTextlist},NUM,'',"Value","Text")

```

The whole tag(..... thing get the value of every specific tag I want. the only thing that is not working is that it is not filling that number that the function "tag" is getting into the function Lookup. This is probably some nested thing that isn't allowed? or am I wrong?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 24, 2023, 10:58am UTC](https://forum.inductiveautomation.com/t/alarm-binding-dataset-to-display-path-in-expression/82321/7 "2023-11-24T10:58:39Z")

</div>

> [@Stef\_Velers](#):
>
> ```auto
> NUM = tag("[Test SCADA Ignition]Valve/Valve"+{ValveNum}+"/Stat/HmiFail/alarmText")
> Lookup({[~]AlarmTextlist},NUM,'',"Value","Text")
> 
> ```

You're trying to write a program in an expression. You can't. Treat Ignition's expression language the same way you would treat an Excel function.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 24, 2023, 11:12am UTC](https://forum.inductiveautomation.com/t/alarm-binding-dataset-to-display-path-in-expression/82321/8 "2023-11-24T11:12:25Z")

</div>

Judging by your deleted post, this is getting a bit complicated as you are running a script in a UDT. I just offer the following which may help you.

The binding should start by retrieving the valve number. The output of any binding is passed to any subsequent transform as **{value}**. You can then work on that.

```auto
// This expression transform requires that the valve number be passed in by {value}
// from a property binding or expression binding.
// Syntax:
// lookup(dataset, lookupValue, noMatchValue, [lookupColumn], [resultColumn])
lookup(
	tag("[~]AlarmTextlist"), // The dataset.
	tag("[Test SCADA Ignition]Valve/Valve" + {value} + "/Stat/HmiFail/alarmText"), // The lookup value.
	null, // noMatchValue
	"Value", // The name of the column to lookup.
	"Text" // The name of the column holding the result.
)

```

As I said, you'll need to figure out the dataset and tag paths. Hopefully I've given you some pointers.

Expression language doesn't seem to be case-sensitive but I would still observe the manual's syntax and use `lookup` rather than `Lookup`.

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [November 24, 2023, 11:37am UTC](https://forum.inductiveautomation.com/t/alarm-binding-dataset-to-display-path-in-expression/82321/9 "2023-11-24T11:37:23Z")

</div>

Thank you so much!!! I have something I can work with now. Appreciate the time and effort!
