on 03-13-2014 2:07 PM
Hi,
is there a (not too complex) way to convert an uppercase string to a string where only the first characters of the words are upper case?
The field contains multiple words and every word should begin with a capital.
There are only string rules for all uppercase or all lowercase strings..
Hi Dieter,
This can be done using the JAVASCRIPT function. You can write javascript code to do the work and call that code from within an Agentry rule.
For example, the following rule (paste into your editor) is using the Javascript code on the City property to make the first characters of the words uppercase and the rest lowercase.
(@JAVASCRIPT ((*argv[0].toLowerCase$28$$29$.replace$28$ /$28$^|\s$29$$28$[a-z]$29$/g , function$28$m,p1,p2$29${ return p1+p2.toUpperCase$28$$29$; } $29$;)) :>12"City")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.