# Format input feld value according to tag FormatString property

**URL:** <https://forum.inductiveautomation.com/t/format-input-feld-value-according-to-tag-formatstring-property/83723>\
**Category:** Ignition\
**Created:** [January 3, 2024, 7:50am UTC](https://forum.inductiveautomation.com/t/format-input-feld-value-according-to-tag-formatstring-property/83723 "2024-01-03T07:50:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ReyC](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/reyc/32/49461_2.png) [@ReyC](https://forum.inductiveautomation.com/u/ReyC)\
**Post date:** [January 3, 2024, 7:50am UTC](https://forum.inductiveautomation.com/t/format-input-feld-value-according-to-tag-formatstring-property/83723/1 "2024-01-03T07:50:33Z")

</div>

I would like to format a numeric input field value according to **Tag** _formatString_ property. I did not find the proper way to achieve that. Dose anyone have a tricks ?

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

---

<div class="post-metadata">

**Author:** ![ReyC](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/reyc/32/49461_2.png) [@ReyC](https://forum.inductiveautomation.com/u/ReyC)\
**Post date:** [January 3, 2024, 8:02am UTC](https://forum.inductiveautomation.com/t/format-input-feld-value-according-to-tag-formatstring-property/83723/2 "2024-01-03T08:02:11Z")

</div>

I did it like that for my display value component, and would achieve same result with input field.

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

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/1/d1282a238828cca0cdb68e2dd6d6f31f3a018908.png)

---

<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:** [January 3, 2024, 7:53pm UTC](https://forum.inductiveautomation.com/t/format-input-feld-value-according-to-tag-formatstring-property/83723/3 "2024-01-03T19:53:39Z")

</div>

Have you tried binding the tag's format property to the numeric field's format property? If you utilize this then it should allow for an indirect bidirectional binding on the actual value.

![tmp235](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/4/f4c8b322f4117c574ad81ecf1447216484bc886f.png)

You can also do indirect binding on the format property:

 ![tmp236](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/9/39e31f38998f0dc52bc25e532dcc3b93c8b079b1.png)

Also, something to keep in mind with use of `tag` in expression bindings:

> [@Perspective Components' Value Binding](https://forum.inductiveautomation.com/t/perspective-components-value-binding/83563/14):
>
> Everywhere in a UI you **think** you need a `tag()` function, train yourself to split off a custom property with an indirect binding.

> [@Perspective Components' Value Binding](https://forum.inductiveautomation.com/t/perspective-components-value-binding/83563/14):
>
> The Engineering Unit binding, on a component custom property, looks like this: The Format String binding is similar, also on a component custom property. Then the text property binding (I used a label component) would look like this: No tag() function! Everywhere in a UI you think you need a tag() function, train yourself to split off a custom property with an indirect binding.

---

<div class="post-metadata">

**Author:** ![ReyC](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/reyc/32/49461_2.png) [@ReyC](https://forum.inductiveautomation.com/u/ReyC)\
**Post date:** [January 5, 2024, 3:49pm UTC](https://forum.inductiveautomation.com/t/format-input-feld-value-according-to-tag-formatstring-property/83723/4 "2024-01-05T15:49:48Z")

</div>

Thanks @ryan.white

**Yes, it works with binding tag's format property to numeric field's format property.** That's nice.

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

So, I did it with _expression_ as a result it is more convinient for me :

Value:

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

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/3/636a3ecd540b946764c04a64616cb7415b9c890f.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/7/174f75ae5f2473943e90384fbb271ad159979fdb.png)

Format :

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

**@pturmel, What do you mean by :**

> No `tag()` function! Everywhere in a UI you **think** you need a `tag()` function, train yourself to split off a custom property with an indirect binding.

Do you mean the first methode is more suitable ?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/7/47365a8da13d66d9c4ce56e23b84b617afba61c1.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/9/49fbc911c34d6d182ac940260932039ffb962cb5.png)

---

<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:** [January 5, 2024, 4:59pm UTC](https://forum.inductiveautomation.com/t/format-input-feld-value-according-to-tag-formatstring-property/83723/5 "2024-01-05T16:59:27Z")

</div>

> [@ReyC](#):
>
> is more suitable

Yes, use **Tag Binding** instead of **Expression Binding** with any `tag()` function.
