# Function to calculate Fraction value

**URL:** <https://www.dynamicsuser.net/t/function-to-calculate-fraction-value/9916>\
**Category:** Developers Forum\
**Created:** [April 28, 2005, 8:10pm UTC](https://www.dynamicsuser.net/t/function-to-calculate-fraction-value/9916 "2005-04-28T20:10:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fmartinez](https://avatars.discourse-cdn.com/v4/letter/f/85f322/32.png) [@Fmartinez](https://www.dynamicsuser.net/u/Fmartinez)\
**Post date:** [April 28, 2005, 8:10pm UTC](https://www.dynamicsuser.net/t/function-to-calculate-fraction-value/9916/1 "2005-04-28T20:10:53Z")

</div>

Hi there: I added one field on Item Table, Item Internal Diameter - Decimal But whenever I type the fraction value it convers it to decimal. Does anyone has a function to show original fraction value? I already asked the people on our corporate offices to change the field to Text, but they want to keep it decimal.

---

<div class="post-metadata">

**Author:** ![john\_cage](https://avatars.discourse-cdn.com/v4/letter/j/e8c25b/32.png) [@john\_cage](https://www.dynamicsuser.net/u/john_cage)\
**Post date:** [April 29, 2005, 8:47am UTC](https://www.dynamicsuser.net/t/function-to-calculate-fraction-value/9916/2 "2005-04-29T08:47:44Z")

</div>

Fransisco, I think you have to choose between the both. Otherwise you can create a text field with the fraction an automatically copy this field in the decimal field using “Format”.[V] Regards John

---

<div class="post-metadata">

**Author:** ![FormerMember](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@FormerMember](https://www.dynamicsuser.net/u/FormerMember)\
**Post date:** [April 29, 2005, 1:29pm UTC](https://www.dynamicsuser.net/t/function-to-calculate-fraction-value/9916/3 "2005-04-29T13:29:45Z")

</div>

I have used two fields before and just kept them in sync. It involves writing a fairly complicated routine to create the fractions from the decimal field if you want to be able to update either field.

---

<div class="post-metadata">

**Author:** ![Timo\_Lasser](https://avatars.discourse-cdn.com/v4/letter/t/94ad74/32.png) [@Timo\_Lasser](https://www.dynamicsuser.net/u/Timo_Lasser)\
**Post date:** [May 2, 2005, 11:31am UTC](https://www.dynamicsuser.net/t/function-to-calculate-fraction-value/9916/4 "2005-05-02T11:31:45Z")

</div>

> **quote:**
> 
> | I have used two fields before and just kept them in sync. It involves writing a fairly complicated routine to create the fractions from the decimal field if you want to be able to update either field.  
> _Originally posted by chrisk - 2005 Apr 29 : 15:29:45_  
> |
> | --- |

Is it possible that you can put your Codeunit to the download area?
