Script to Change Case to Caps

 Description

This article shows you how to change the case of alpha characters to Caps.

Steps

To change the case of all alpha data in a field to Caps, follow these steps:

  1. Set up a scripting field and an input field.
  2. Modify the example below using the names of the fields on your label.
  3. Copy the modified script into the scripting field data source window.
     
Copy
Script
<pre class="syntaxhighlighter-pre" xml:space="preserve">//input from label 
var LowerCase = label.fields.field.(@name == 'Description').@data;  
//change the case of alpha characters in string 
var UpperCase= LowerCase.toUpperCase();  
//output data to label 
label.fields.field.(@name == 'Description').@data=UpperCase;</pre>