# Numeric entry with unit conversion (bidirectional) question

**URL:** <https://forum.inductiveautomation.com/t/numeric-entry-with-unit-conversion-bidirectional-question/113027>\
**Category:** Ignition\
**Created:** [December 30, 2025, 3:50pm UTC](https://forum.inductiveautomation.com/t/numeric-entry-with-unit-conversion-bidirectional-question/113027 "2025-12-30T15:50:08Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Chris\_Bingham](https://avatars.discourse-cdn.com/v4/letter/c/e5b9ba/32.png) [@Chris\_Bingham](https://forum.inductiveautomation.com/u/Chris_Bingham)\
**Post date:** [December 31, 2025, 6:27pm UTC](https://forum.inductiveautomation.com/t/numeric-entry-with-unit-conversion-bidirectional-question/113027/9 "2025-12-31T18:27:55Z")

</div>

Regarding "bind a custom property to `engUnit` on the tag" above, the goal would be to allow conversion from _any_ unit to another of the operator's choosing. The conversion would be a two-step process, but straightforward. Ex: "R" --\> "degF" --\> "degC" (where 'degF' is selected as your 'standard' for temperature conversion). Consider building a table (as a tag and/or session prop?) which contains everything needed for any unit conversion to another. Something resembling:

| Units | Type | Factor | Offset |
| --- | --- | --- | --- |
| psig | Pressure | 1 | 0 |
| psia | Pressure | 1 | -14.6959 |
| inHg | Pressure | 0.491154 | 0 |
| inH2O | Pressure | 0.0360912 | 0 |
| kPa | Pressure | 0.14503774 | -14.6959 |
| °F | Temperature | 1 | 0 |
| °R | Temperature | 1 | -459.67 |
| °C | Temperature | 1.8 | 32 |
| gpm | Rate | 1 | 0 |
| m³/s | Rate | 15,850.30 | 0 |
| ft³/min | Rate | 7.48052 | 0 |

- Optionally, add an additional column for an adjustment to `formatString` on the tag.
- The slope (Factor) & intercept (Offset) columns would contain values to convert to a standard unit of your choosing.
- Disclaimer, don't trust any numbers in the table above, or my math below. 🤓
- An operator could select their desired units (from a config screen), whereby session props would contain the desired scaling (via `lookup()` function) to convert from their selected unit to a standard unit. Inside of your view, custom properties would contain the same logic - scaling to get from units on the tag to standard units. Combine the session props w/ view props to provide the resultant scaling, all in one expression binding (extra parenthesis added):

```python
ClientValue = (((TagValue * TagFactor) + TagOffset) - ClientOffset) / ClientFactor

```

(I suppose you could also come up with resultant scaling values as additional custom props).

---

_[View the full topic](https://forum.inductiveautomation.com/t/numeric-entry-with-unit-conversion-bidirectional-question/113027)._
