Expand my Community achievements bar.

SOLVED

Extra braket add

Avatar

Level 5

When user will type "123", field will show "(123)"

When user will type "ABC", field will show "(ABC)"

What is the code for it?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

You really need to have a look at this Adobe guide for picture clauses (eg patterns):

http://partners.adobe.com/public/developer/en/xml/picture_clause_2.0.pdf

If you want a hyphen, then you need to build it into the display pattern inside of single quotation marks.

num{'('999'-'999')'} will display (123-456).

Hope that helps,

Niall

View solution in original post

4 Replies

Avatar

Level 10

Hi,

You don't need any script. You can achieve this by editting the display pattern. Select the object and click Patterns in the Object > Field palette.

For example for a numeric field you can inset the brackets with single quotation marks:

num{'('zzzz9')'}

Same approach with text display patterns.

Hope that helps,

Niall

Avatar

Level 5

Nice work!

I have set num(). It works well for 123 but when I type "123-123", I have not seen hypen.

What should I do?

Avatar

Correct answer by
Level 10

Hi,

You really need to have a look at this Adobe guide for picture clauses (eg patterns):

http://partners.adobe.com/public/developer/en/xml/picture_clause_2.0.pdf

If you want a hyphen, then you need to build it into the display pattern inside of single quotation marks.

num{'('999'-'999')'} will display (123-456).

Hope that helps,

Niall

Avatar

Level 5

Thanks a lot for sending reference and help me.