# Best way to get correct error messages

**URL:** <https://forum.inductiveautomation.com/t/best-way-to-get-correct-error-messages/82215>\
**Category:** General Discussion\
**Tags:** vision\
**Created:** [November 21, 2023, 7:28pm UTC](https://forum.inductiveautomation.com/t/best-way-to-get-correct-error-messages/82215 "2023-11-21T19:28:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason.schwenk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jason.schwenk/32/18822_2.png) [@jason.schwenk](https://forum.inductiveautomation.com/u/jason.schwenk)\
**Post date:** [November 21, 2023, 7:28pm UTC](https://forum.inductiveautomation.com/t/best-way-to-get-correct-error-messages/82215/1 "2023-11-21T19:28:33Z")

</div>

So I have an excel file with 60 or so error codes and associated messages. What would be the best way to read the error code value and get the associated description for display on my vision screen?  
Partial list for illustration

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

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [November 21, 2023, 7:47pm UTC](https://forum.inductiveautomation.com/t/best-way-to-get-correct-error-messages/82215/2 "2023-11-21T19:47:42Z")

</div>

In a script, either parse the excel file directly or export it as CSV, and then parse it , and store the data in a database table. Then load that data from the DB table into a dataset tag and use that tag to use `lookup` in an expression or look through the dataset in a script.

Storing it in a DB table makes sure the data will exist in a decently permanent place instead of relying on a global tag to save the data through a gateway restart. You probably aren't hitting the upper limit on the amount of data you can store in a tag, but its a good habit to have.

---

<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 21, 2023, 7:50pm UTC](https://forum.inductiveautomation.com/t/best-way-to-get-correct-error-messages/82215/3 "2023-11-21T19:50:22Z")

</div>

If you're going to go the database route (which I would recommend) then add in a column for the machine name. Then you can add every error code for every machine is in the one table.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 22, 2023, 11:37am UTC](https://forum.inductiveautomation.com/t/best-way-to-get-correct-error-messages/82215/4 "2023-11-22T11:37:59Z")

</div>

> [@Transistor](#):
>
> machine name.

Machine id\*
