# Read Tag with Formatting - Best Practice

**URL:** <https://forum.inductiveautomation.com/t/read-tag-with-formatting-best-practice/109648>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [August 12, 2025, 3:42pm UTC](https://forum.inductiveautomation.com/t/read-tag-with-formatting-best-practice/109648 "2025-08-12T15:42:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liam\_Dietrich](https://avatars.discourse-cdn.com/v4/letter/l/b5a626/32.png) [@Liam\_Dietrich](https://forum.inductiveautomation.com/u/Liam_Dietrich)\
**Post date:** [August 12, 2025, 3:42pm UTC](https://forum.inductiveautomation.com/t/read-tag-with-formatting-best-practice/109648/1 "2025-08-12T15:42:13Z")

</div>

Is it possible to use a binding to read a tag value with it’s format already applied?

Currently I read the raw value and the format string using two separate bindings. Then I format the value using an expression binding and `numberFormat()`. It feels as though this can be achieved in a simpler manner - any suggestions are appreciated.

Example of current method:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/7/775a9238e87c3f7f43f54394de2e78b89fe00385.png)

---

<div class="post-metadata">

**Author:** ![Ryan\_Deardorff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_deardorff/32/63815_2.png) [@Ryan\_Deardorff](https://forum.inductiveautomation.com/u/Ryan_Deardorff)\
**Post date:** [August 12, 2025, 3:49pm UTC](https://forum.inductiveautomation.com/t/read-tag-with-formatting-best-practice/109648/2 "2025-08-12T15:49:57Z")

</div>

Assuming that `_value` and `_format` are also just Expression Bindings, then you can just place those Expressions together inside of the single `numberFormat` Expression.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 12, 2025, 3:52pm UTC](https://forum.inductiveautomation.com/t/read-tag-with-formatting-best-practice/109648/3 "2025-08-12T15:52:46Z")

</div>

What you are doing with `_value` and `_format` are what you need to do if you intend to use indirect tag binding with this label. Consider placing the expression on `_valueFormatted` directly on `props.text` for the label.

---

<div class="post-metadata">

**Author:** ![Liam\_Dietrich](https://avatars.discourse-cdn.com/v4/letter/l/b5a626/32.png) [@Liam\_Dietrich](https://forum.inductiveautomation.com/u/Liam_Dietrich)\
**Post date:** [August 12, 2025, 4:01pm UTC](https://forum.inductiveautomation.com/t/read-tag-with-formatting-best-practice/109648/4 "2025-08-12T16:01:01Z")

</div>

`_value` and `_format` are both tag bindings, accessing the tags _Value_ and _FormatString_, respectively. So unless I want to use the `tag()`function within the expression, which I avoid due to potential issues, I don’t see a method to combine this into one expression binding.

---

<div class="post-metadata">

**Author:** ![Liam\_Dietrich](https://avatars.discourse-cdn.com/v4/letter/l/b5a626/32.png) [@Liam\_Dietrich](https://forum.inductiveautomation.com/u/Liam_Dietrich)\
**Post date:** [August 12, 2025, 4:04pm UTC](https://forum.inductiveautomation.com/t/read-tag-with-formatting-best-practice/109648/5 "2025-08-12T16:04:04Z")

</div>

Thank you for the reply! It sounds like I am out of luck.

I was hoping I was missing something obvious, since the value is already formatted properly in the tag browser.

---

<div class="post-metadata">

**Author:** ![Ryan\_Deardorff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_deardorff/32/63815_2.png) [@Ryan\_Deardorff](https://forum.inductiveautomation.com/u/Ryan_Deardorff)\
**Post date:** [August 12, 2025, 4:04pm UTC](https://forum.inductiveautomation.com/t/read-tag-with-formatting-best-practice/109648/6 "2025-08-12T16:04:58Z")

</div>

Yeah, I never use `tag()` as I’ve heard it should be avoided, though I’m not sure why, exactly.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 12, 2025, 4:14pm UTC](https://forum.inductiveautomation.com/t/read-tag-with-formatting-best-practice/109648/7 "2025-08-12T16:14:59Z")

</div>

Heh: So many rants:

[https://forum.inductiveautomation.com/search?q=%40pturmel%20%22tag()%22%20order%3Alatest](https://forum.inductiveautomation.com/search?q=%40pturmel%20%22tag()%22%20order%3Alatest)

---

<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:** [August 12, 2025, 4:24pm UTC](https://forum.inductiveautomation.com/t/read-tag-with-formatting-best-practice/109648/8 "2025-08-12T16:24:25Z")

</div>

Quoting a response in that list that explains it:

> [@Indirect Tags versus Tag() function](https://forum.inductiveautomation.com/t/indirect-tags-versus-tag-function/95947/2):
>
> Every difference in behavior between the tag() function and indirect tag bindings is a negative against the tag() function. tag(), like any expression function, must deliver an answer in the thread that is running the whole expression. But on expression startup that means waiting on the tag subsystem to establish the subscription and deliver the initial value. This creates stalls. Indirect tag bindings deliver asynchronously. The string expression within the parentheses of tag() must re…

---

<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:** [August 12, 2025, 4:57pm UTC](https://forum.inductiveautomation.com/t/read-tag-with-formatting-best-practice/109648/9 "2025-08-12T16:57:21Z")

</div>

Here's a method to use the FormatString defined in the tag. It might work for you. The sample memory tag is a float with value = 32.1234567,

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/b/0bae54aac936cd91e5691dd4862eda8b2be2320e.png)

- Create three custom properties on the label.

1. Right-click on the tag, copy path, and paste it in here.
2. Create an indirect tag binding on `custom.tagValue`.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/4/741c647ba0815776979f8d72bcaadfa43135f4f5.png)
3. Create an indirect tag binding on `custom.formatString`.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/3/f372da2988df622d7c28368d5a67c9584c77f091.png)
4. Create an expression binding on `props.text`.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/c/1c960f061d00cb3b93413500c88c1e42ef3b3677.png)  
Expression: `numberFormat({this.custom.tagValue}, {this.custom.formatString})`

You should now be able to copy the label as often as required, set the tagPath and everything should work.

Adding the EngUnit is an exercise left to the reader.

Here's a link to a post written by a younger me: [Creating a Perspective tag-drop view (almost) [solution]](https://forum.inductiveautomation.com/t/creating-a-perspective-tag-drop-view-almost-solution/43376). It might give some ideas.
