# What is the binding showing up yellow characters

**URL:** <https://forum.inductiveautomation.com/t/what-is-the-binding-showing-up-yellow-characters/86267>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [February 23, 2024, 4:05pm UTC](https://forum.inductiveautomation.com/t/what-is-the-binding-showing-up-yellow-characters/86267 "2024-02-23T16:05:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![scadafan](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@scadafan](https://forum.inductiveautomation.com/u/scadafan)\
**Post date:** [February 23, 2024, 4:05pm UTC](https://forum.inductiveautomation.com/t/what-is-the-binding-showing-up-yellow-characters/86267/1 "2024-02-23T16:05:06Z")

</div>

Bit of an odd question but I had to make some changes to a db reference. Which worked fine however, now when I bind a sparkline to the desired ranges the little green background isn't showing up but if I hard code the number into there it does. I noticed when I bind the db reference it returns the number in green characters. However, if I hard code a number it shows up in yellow and when I do it that way the sparkline functions correctly. Here is a picture to illustrate what I mean. You see desiredHigh and Low showing up in green.  
 ![binding](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/b/9bad06c94c66e68b3195e03307624e9f7dcd5b6c.png)

Anyone know how I can fix this

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 23, 2024, 4:14pm UTC](https://forum.inductiveautomation.com/t/what-is-the-binding-showing-up-yellow-characters/86267/2 "2024-02-23T16:14:37Z")

</div>

This is a hint as to what type the internal JSON element is.  
Green means "this is a string", even if it looks like a number.  
Yellow means "this is a number".

---

<div class="post-metadata">

**Author:** ![scadafan](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@scadafan](https://forum.inductiveautomation.com/u/scadafan)\
**Post date:** [February 23, 2024, 4:20pm UTC](https://forum.inductiveautomation.com/t/what-is-the-binding-showing-up-yellow-characters/86267/3 "2024-02-23T16:20:26Z")

</div>

Is there any way I can force it to a number

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 23, 2024, 4:23pm UTC](https://forum.inductiveautomation.com/t/what-is-the-binding-showing-up-yellow-characters/86267/4 "2024-02-23T16:23:08Z")

</div>

Can you show your binding?  
If it's e.g. a named query binding, it's going to be whatever your column type is.  
If you want to coerce it to a number, the best place to do that is in your SQL query, but if you can't do that for whatever reason you could add a transform that uses the `toDouble` expression function.

---

<div class="post-metadata">

**Author:** ![scadafan](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@scadafan](https://forum.inductiveautomation.com/u/scadafan)\
**Post date:** [February 23, 2024, 5:07pm UTC](https://forum.inductiveautomation.com/t/what-is-the-binding-showing-up-yellow-characters/86267/5 "2024-02-23T17:07:26Z")

</div>

Basically I do the binding in a tag. Its a simple select \* from table. And then this is the binding:

tag('[OPC1]dbTables/current/Table1')[0,21]

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 23, 2024, 5:17pm UTC](https://forum.inductiveautomation.com/t/what-is-the-binding-showing-up-yellow-characters/86267/6 "2024-02-23T17:17:04Z")

</div>

Digression: If you're not assembling a dynamic tag path, you don't need (and shouldn't use) the `tag` expression function - just put the path you want to reference in curly braces and it'll be automatically read/subscribed to:  
`{[OPC1]dbTables/current/Table1}[0,21]`

That aside, the column type in your dataset will be whatever the column type is coming back as from the DB.  
So, again - the _best_ option is to fix it in the DB. If it's coming back as a string, that strongly suggests the DB's column type is string, which is basically always wrong for numeric data.

The second best option is to coerce in your query, so instead of `SELECT *` use `SELECT x, y, someCoercionFunctionToFloat(z) as z`.

The third best (also known as worst option 🙂) is to update your expression to do explicit coercion:  
`toDouble({[OPC1]dbTables/current/Table1}[0,21])`

---

<div class="post-metadata">

**Author:** ![scadafan](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@scadafan](https://forum.inductiveautomation.com/u/scadafan)\
**Post date:** [February 23, 2024, 5:48pm UTC](https://forum.inductiveautomation.com/t/what-is-the-binding-showing-up-yellow-characters/86267/7 "2024-02-23T17:48:18Z")

</div>

Ok this makes perfect sense. Thank you. I will make my corrections
