Expand my Community achievements bar.

Valdation Pattern - displaying postal code in upper case

Avatar

Level 4

Hello

I want to use the Object > Value > Validation Pattern > Display/Edit and Data tabs to display and save postal code data in uppercase regardless of whether you enter it in lower case.

By default, it shows

text{A9A 9A9}

When i set the Display tab to this and enter a postal code in lower case, it doesnt set it to upper case in the display.

When i put

text{A9A 9A9}|text{a9a 9a9}

it indicates that text {a9a 9a9} is invalid.

My backend system requires the postal code in uppercase.

Any clue how to do with WITHOUT code?

thanks.

2 Replies

Avatar

Level 10

You can't do it without code, but the code is very simple.

On the Exit event of the field put the folowing (make sure the script editor is set for FormCalc):

$ = Upper($)

Avatar

Level 2

on exit event.

use this script.

this.rawValue

= this.rawValue.toUpperCase();