Expand my Community achievements bar.

Numeric field question

Avatar

Level 7

how I can make a numeric field to display a decimal like  1.00, 2.32, 3.33,0.45

Thanks

5 Replies

Avatar

Level 5

Select Numeric Field

Object > Field > click on Patterns buttons. Small window will open.

Under Display tab select which ever pattern you want.

Vjay

Avatar

Former Community Member

Hi mmgiath,

If i am not wrong, numeric field by default accepts decimal. Please check.

Thanks,

VJ

Avatar

Level 7

May someone help me a little more with this ?

All I want is if someone enters 1 for exampe to display 1.00

or  if someone enters 235 for exampe to display 2.35...and so on...

What I have to use numeric or decimal field?

Thank you

Avatar

Level 10

This can be done either with numeric or decimal fields.

What you need is two patterns and one script, to make the field work the way you described.

1. Add this edit pattern: num{zz9}

2. Add this display pattern: num{9.99}

3. Add this FormCalc script to the exit event of the field.

if (Len($) eq 2) then

          $ = $ / 10

elseif (Len($) eq 3) then

          $ = $ / 100

else

          $

endif

Avatar

Level 7

Thank you my friend!

works fine! Thanks