Skip to main content
Conga Support

Index outside bounds of arrays

CAUSE
 
The formula fields for Conga Batch and Conga Trigger use ampersands (&) to identify parameters. If you pass to a parameter a field that might contain an ampersand, such as passing an ACCOUNT_NAME field to the OFN ("Optional File Name") parameter (for example, "Ben & Jerry's"), within the formula, it has the effect of prematurely terminating the formula, and returns this error.
 
What To Do
 
To prevent this from happening, Conga recommends you use the Salesforce SUBSTITUTE function to automatically substitute any ampersand with a special character string that Conga Composer recognizes as a substitute for ampersands (Conga Composer will later output the original value).
 
The formula below passes the Account Name field to the OFN parameter. Since some Account Name fields might contain an ampersand, the best practice is to use the SUBSTITUTE function to replace the ampersands with three ~~~ (tilde) characters: 
 
Incorrect: 

"&OFN=Executive+Brief+-+" + Name 
 
Correct: 

"&OFN=Executive+Brief+-+" + SUBSTITUTE( Name, "&", "{~~~}")  

After processing the URL, Conga Composer will generate the output file with the original value, including any ampersand.