# Inserting Tag Value into Message Banner Text

**URL:** <https://forum.inductiveautomation.com/t/inserting-tag-value-into-message-banner-text/8704>\
**Category:** Ignition\
**Created:** [July 10, 2014, 2:50pm UTC](https://forum.inductiveautomation.com/t/inserting-tag-value-into-message-banner-text/8704 "2014-07-10T14:50:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrusciano](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@mrusciano](https://forum.inductiveautomation.com/u/mrusciano)\
**Post date:** [July 10, 2014, 2:50pm UTC](https://forum.inductiveautomation.com/t/inserting-tag-value-into-message-banner-text/8704/1 "2014-07-10T14:50:26Z")

</div>

Is there a way to insert a tag’s value through scripting or some other method into the text of a state driven message banner? I have a tag that contains an integer error code and I would like to have that inline with the error.

Example:

When messageState = 10, message banner turns red and I want it to display

DISPATCH FAILED WITH [error code read from tag] PLEASE ACKNOWLEDGE

Thanks!

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [July 11, 2014, 8:51am UTC](https://forum.inductiveautomation.com/t/inserting-tag-value-into-message-banner-text/8704/2 "2014-07-11T08:51:45Z")

</div>

for this type of scenario you have many options.

Id start by putting my states in a database table. 1 column with the int value and another with the text.

You could then create an expression tag with string datatype that executes a query to grab the text, using the intvalue of the tag coming from your end device.

You could also use a tag change script that looks for any change on the intvalue tag and it would then execute the query and write the text value to a string memory tag that you create.

In either of these methods you would use the string datatype tag that you create in your banner.
