Expand my Community achievements bar.

## Fractions

Former Community Member
First, thanks to all who helped me with my last post. I was able to get it to work most of the time.

On to something completely different. Can Livecycle handle fractions? I need to show results in fractional format if possible.

4 Replies

Level 7
Yes, but you will have to create the text fromatted text strings. Now if you need to use the results displayed as a fraction, you will need to convert the formatted string into a decimal number or use a second hidden field for computation use.

Former Community Member
All I really need to do is take the result of some calculations and display them as a fraction. So I guess that would be converting them from a decimal into a fraction.

Former Community Member
Well I've searched the forums and haven't found anything on converting a computed result from a decimal into a fraction. Any thoughts?

Level 7
Have you looked at Convert From a Decimal To a Fraction , http://www.webmath.com/dec2fract.html?

If you enter a decimal number and press the convert number it will show you the steps taken to compute the resulting fraction.

You need to determine the number of decimal places and the Greatest Common Divisor (GCD)or Greatest Common Factor (GCF).

Or use Gooogle to search for "decimal to fractions JavaScript", http://www.google.com/search?hl=en&q=decimal+to+fractions+JavaScript&start=0&sa=N ?