Understanding ADF's Additional Built-in Groovy Functions
This section explains a number of additional helper functions you can use in your scripts. Some provide a simple example as well.
Use the Functions tab of the code editor palette to insert any of the built-in functions into your script.
| 
        Function  | 
      
        Description  | 
     
|---|---|
| 
        
                  | 
      
        Returns: the current date, with no time 
                Return Type:
          | 
     
| 
        
                  | 
      
        The current date and time 
                Return Type:
          | 
     
| 
        
                  | 
      
        Returns: a date, given the year, month, and day 
                Return Type:
         Parameters: 
 
                Example: to return a date for February 8th, 1998, use
           | 
     
| 
        
                  | 
      
        Returns: a timestamp, given the year, month, day, hour, minute, and second 
                Return Type:
         Parameters: 
 
                Example: to return a timestamp for February 8th, 1998, at 23:42:01, use
           | 
     
| 
        
                  | 
      
        Returns: the year of a given date 
                Return Type:
         Parameters: 
 
                Example: if   | 
     
| 
        
                  | 
      
        Returns: the month of a given date 
                Return Type:
         Parameters: 
 
                Example: if   | 
     
| 
        
                  | 
      
        Returns: the day for a given date 
                Return Type:
         Parameters: 
 
                Example: if   | 
     
| 
        Function  | 
      
        Description  | 
     
|---|---|
| 
        
                  | 
      
        
                Returns:
         
                Return Type:
         Parameters: 
 
                Example: if   | 
     
| 
        
                  | 
      
        
                Returns:
         
                Return Type:
         Parameters: 
 For example, if   | 
     
| 
        
                  | 
      
        
                Returns: the integer position of the first character in string  
                Return Type:
         Parameters: 
 
                Example: if   | 
     
| 
        
                  | 
      
        
                Returns: the first  
                Return Type:
         Parameters: 
 
                Example: if   | 
     
| 
        
                  | 
      
        
                Returns: the length of string  
                Return Type:
         Parameters: 
 
                Example: if   | 
     
| 
        
                  | 
      
        
                Returns: the string  
                Return Type:
         Parameters: 
 
                Example: if   | 
     
| 
        
                  | 
      
        
                Returns: the last  
                Return Type:
         Parameters: 
 
                Example: if   | 
     
| 
        
                  | 
      
        
                Returns:
         
                Return Type:
         Parameters: 
 
                Example: if   | 
     
| 
        
                  | 
      
        
                Returns: the substring of  
                Return Type:
         Parameters: 
 Examples: if   | 
     
| 
        
                  | 
      
        
                Returns: the substring of  
                Return Type:
         Parameters: 
 
                Example: if   | 
     
| 
        
                  | 
      
        
                Returns: the string  
                Return Type:
         Parameters: 
 
                Example: if   | 
     
| 
        Function  | 
      
        Description  | 
     
|---|---|
| 
        
                  | 
      
        
                Returns: a  
                Return Type:
         Parameters: 
 
                Example:
          | 
     
| 
        
                  | 
      
        
                Returns: a multi-valued key object for use in the  
                Return Type:
         Parameters: 
 
                Example: if a standard object has a two-field key, use
           | 
     
| 
        
                  | 
      
        
                Returns: a key object for use in the  
                Return Type:
         Parameters: 
 
                Example: if a standard object has a single-field key, as all custom objects do, use
           | 
     
| 
        
                  | 
      
        
                Returns: the object  
                Return Type:
         Parameters: 
 
                Example: to calculate the sum of   | 
     
              encodeToBase64(
              
                s
              
              )
             | 
      
        
                Returns: the base64 encoding of  
                Return Type:
         Parameters: 
  | 
     
              decodeBase64(
              
                s
              
              )
             | 
      
        
                Returns: the base64 decoding of  
                Return Type:
         Parameters: 
  | 
     
              decodeBase64ToByteArray(
              
                s
              
              )
             | 
      
        
                Returns: byte array decoding of  
                Return Type:
         Parameters: 
  | 
     
              
        encodeByteArrayToBase64(
              
                b
              
              )
             | 
      
        
                Returns: base64 encoding of  
                Return Type:
         Parameters: 
  |