Use Salesforce Functions (IF, OR, ISPICKVAL) in a Conga Composer Button URL
Using functions in Salesforce custom button or link URLs provides a way to dynamically determine behavior for Conga Composer parameters. This allows a Composer button or link to perform different functions based on certain criteria, including the values of fields in Salesforce. This logic can be applied using different Salesforce functions for various parameters or conditions within the Composer button URL. See Salesforce Help's Formula Operators and Functions Overview to familiarize yourself with the various functions available.
Example 1 - Simple IF Function
Let's say that you want to generate invoices from Opportunity records, but want to lock the file output format to PDF for all users with a profile other than System Administrator.
Logically, we want to set the value of the &FP0 parameter to either 0 or 1 depending on the profile of the current user.
Example 2 - Evaluating Multiple Field Values - IF / OR / ISPICKVAL Function
The management team has dictated that an invoice can be generated with Conga Composer only if the Stage on the Opportunity record is one of three values: Proposal Made, Due Diligence, or Closed Won. We'll use the Composer DC parameter to specify this condition.
Example 3 - Evaluating Whether a Field Is Blank - IF / OR / ISNULL Function
If either the Case Principal, Case MRF, or Case Monthly Rate fields are blank (the ISNULL function evaluates whether a field is populated or not), we don't want Conga Composer to run (and would therefore want to enable the DC parameter to disable Conga Composer -- &DC=1). The following functions would accomplish this:
&DC={!IF( OR( ISNULL(Case.Principal__c), ISNULL(Case.MRF__c), ISNULL(Case.Monthly_Rate__c)), 1, 0)}