Inserting Tag Value into Message Banner Text

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!

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.