Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Patterns

Avatar

Former Community Member

I'm trying to set a numeric field to have a % sign added at the end of the number. example: 10% 20% or 100%. Everytime the entry is entered it always adds two zeros to the end of the entry making it 1000% 2000% or 10,000%.My current pattern is num{zzzz9%} .

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

The easiest way is to edit the number pattern, by adding the percent sign in single quotes:

num{zz9'%'}

You can any string you want to any pattern using the single quotes. Extending this:

num{'The percentage is 'zz9'%'}

Even works on numeric fields.

Good luck,

Niall

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

The easiest way is to edit the number pattern, by adding the percent sign in single quotes:

num{zz9'%'}

You can any string you want to any pattern using the single quotes. Extending this:

num{'The percentage is 'zz9'%'}

Even works on numeric fields.

Good luck,

Niall