Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

Show Page Sections

download

Index outside bounds of arrays

ERROR MESSAGE

Ampersands (&) in Conga Batch and Conga Trigger fields.

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: Index outside bounds of arrays

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 recognizes as a substitute for ampersands (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, will generate the output file with the original value, including any ampersand.