# stringFormat

**URL:** <https://forum.inductiveautomation.com/t/stringformat/2830>\
**Category:** Ignition\
**Created:** [March 31, 2011, 6:50pm UTC](https://forum.inductiveautomation.com/t/stringformat/2830 "2011-03-31T18:50:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kjwilde](https://avatars.discourse-cdn.com/v4/letter/k/0ea827/32.png) [@kjwilde](https://forum.inductiveautomation.com/u/kjwilde)\
**Post date:** [March 31, 2011, 6:50pm UTC](https://forum.inductiveautomation.com/t/stringformat/2830/1 "2011-03-31T18:50:18Z")

</div>

I would like to format the text in a multistate indicator when binding it with a tag. I notice there’s a function stringFormat but I can’t find any documentation for it. I’ve tried using it and the best I’ve managed is an output that looks something like this: “[23.5465,Good]” What I’d like is 2 decimal points fixed (source tag is a float) plus a percentage sign. Thanks

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [March 31, 2011, 8:17pm UTC](https://forum.inductiveautomation.com/t/stringformat/2830/2 "2011-03-31T20:17:32Z")

</div>

You can bind the text property of the component to an expression like this:`numberFormat(34.8, "#0.00'%'")`That returns 34.80%. You can find more information on the function here:

[inductiveautomation.com/supp … format.htm](http://www.inductiveautomation.com/support/usermanuals/ignition/gen_strings_numberformat.htm)
