Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Decimal Points

Avatar

Former Community Member
Hello



I have setup a financial reporting form which allows users to enter income/expediture and it sums up the totals.



I have only just realised that the numeric fields do not allow the decimal points to be shown. For example, you might enter $5.50, howevever it displays as $5.00 (rounds down). I have looked at the template forms already seup and cannot work out why it wouldn't work in my template.



Can you help?



Thanks



Emma
2 Replies

Avatar

Former Community Member
Hi,



I could be wrong, but I think you can allow the decimal points to be shown in a Numeric Field by setting the correct

Edit and Display Pattern on the Field tab. The Display pattern specifies how the data will appear in the field. The Edit pattern specifies how the data must be entered into the field.



To set the correct patterns, you need to click the Numeric Field object, select Edit > Patterns > Display, and in the Patterns dialog box (on the Display tab) under Select Type, click num.decimal{}. Then click the Edit tab, and under Select Type, click num.decimal{}. Click Apply, and OK.



For more information on patterns, check out the LiveCycle Designer Help topics - About field patterns and value formatting and When to use patterns in Using LiveCycle Designer ES > Working with Objects > Formatting field values.



I hope that helps,



Drew

Avatar

Former Community Member
Hi,



You could also change your field type to decimal instead of numeric. Then allow only 2 decimal places.



Dennis