# Message file with value bound to tag value

**URL:** <https://forum.inductiveautomation.com/t/message-file-with-value-bound-to-tag-value/52716>\
**Category:** Ignition\
**Created:** [November 4, 2021, 11:28am UTC](https://forum.inductiveautomation.com/t/message-file-with-value-bound-to-tag-value/52716 "2021-11-04T11:28:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JamesUalto](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@JamesUalto](https://forum.inductiveautomation.com/u/JamesUalto)\
**Post date:** [November 4, 2021, 11:28am UTC](https://forum.inductiveautomation.com/t/message-file-with-value-bound-to-tag-value/52716/1 "2021-11-04T11:28:11Z")

</div>

I’m looking to have a message display bar which can have many different descriptions shown by referencing value of a certain tag. My main experience is with AB FactoryTalk View Studio and in this it uses a local message file (if this helps any).

I can write an expression but this is too laborious.

if({Local Messege Tags/StepHMIMsgNo} = 1000, “0 - Off”,  
if({Local Messege Tags/StepHMIMsgNo} = 1001, “1 - Spare”,  
if({Local Messege Tags/StepHMIMsgNo} = 1002, “2 - Spare”,

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [November 4, 2021, 11:30am UTC](https://forum.inductiveautomation.com/t/message-file-with-value-bound-to-tag-value/52716/2 "2021-11-04T11:30:21Z")

</div>

Use the lookup expression: [lookup - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/lookup). Create a dataset tag with all of the messages and states and then use the lookup expression to pull from the column that has the messages.

---

<div class="post-metadata">

**Author:** ![JamesUalto](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@JamesUalto](https://forum.inductiveautomation.com/u/JamesUalto)\
**Post date:** [November 4, 2021, 1:05pm UTC](https://forum.inductiveautomation.com/t/message-file-with-value-bound-to-tag-value/52716/3 "2021-11-04T13:05:19Z")

</div>

I still can’t seem to get it to work… See attached below. I have created my dataset memory tag and added some columns and rows. I have the tag I want to use as the value.

 ![10](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/2/f292f847b12573c5b68380b0cc1f10f72009be1a.png)  
 ![11](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/b/3b073642176701d46527dd29b397d3d63cacebad.png)  
 ![12](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/0/609da9d97223d72a5141f6675d7bd1b3493404c7.png)

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [November 4, 2021, 1:09pm UTC](https://forum.inductiveautomation.com/t/message-file-with-value-bound-to-tag-value/52716/4 "2021-11-04T13:09:16Z")

</div>

so your almost there. You need to provide a no result value. And the last 0,0 isn’t required. It will automatically look in column 0 for the value to find, and pull the results from column 1.

IE:

```auto
lookup({dataSetTag},{messageNumber},'Unknown')

```

BTW post your code in the future bracketed by ``` to get it tor format so we can edit for ya

---

<div class="post-metadata">

**Author:** ![JamesUalto](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@JamesUalto](https://forum.inductiveautomation.com/u/JamesUalto)\
**Post date:** [November 4, 2021, 1:15pm UTC](https://forum.inductiveautomation.com/t/message-file-with-value-bound-to-tag-value/52716/5 "2021-11-04T13:15:42Z")

</div>

Thank you. Its working
