Home > DemandTools for AppExchange Modules > DemandTools Maintenance Modules > Using Conditions
Using Conditions
Conditions are used when subsetting which objects will be updated, exported, and/or searched, depending on the module. In most cases the option to use all objects or specify conditions on which object(s) to use will be available.

When "Use Conditions" is selected the conditions area is no longer greyed out and open for criteria specification.

Step 1. Select the Field to Base a Condition On
- Fields from the selected table will be listed on the left.
- To access fields in a related table select the "+" to the left of the table name. This will display the fields from the related table. Multi-table join is available for Parent tables only, based on foreign key relationships between tables. For example, you can access the Account table from within the Contact table, because the Account ID is physically stored on the Contact Table. You cannot access the Contact table from the Account table.
Step 2. Select the Operator
- Available operators will change based on the type of field selected.
- "!=" represents "not equal to".
- When using dates, operators will include "Today", "Yesterday", etc.".
Step 3. Specify a Value(s)
- Text Fields: Type in the value. Multiple values for the same field are to be separated by commas. Commas are translated as "or". For example, "ma,nh,me" will be translated to "ma or nh or me". Note: values entered are not case sensitive.
- Picklists: Select the value from the specified list. Multiple values can be selected and will be translated as "or".
- Valid picklist values are shown (as defined in Salesforce.com). Right click on a list of picklist values to "Add a Value". This is used to add a value not currently in the picklist and make it available for use in the criteria. The value is added for the purpose of selection and will not be added to the actual picklist in Salesforce.
- Right click on a list of picklist values to "Filter List" to subset a long picklist based on a search string to quickly find a value(s).
- Dates: The current date will default in the value window. Click the arrow on the right to access a calendar and select a specific date.
-
To isolate a specific day regardless of time when dealing with a Date/Time field (i.e. created date), specify 2 conditions, greater than the day before and less than the day after. This is not necessary when using an operator such as "Today" or "Yesterday".
Step 4. Add Condition(s)
- Select "Add Condition" to add the condition to the list of current conditions.
- By default all conditions are and'd together. To create "or" groups see Step 5.
- To delete one condition from the list, click the box to the left to highlight the condition and press the delete key on the keyboard.
Step 5. Creating "OR Groups" (this option is not applicable to all modules)
- To create "or" groups, check the "Expert Mode" checkbox.
- Change the "OR Group" number for specific conditions (click on the number on the right and adjust up or down). All conditions WITHIN a group are and'd and BETWEEN groups are or'd. For example:

Reads as:
(MailingState=ma AND LeadSource=External Referral) OR (MailingState=ny AND LeadSource= Trade Show)
- Unchecking the "Expert Mode" checkbox will cause all conditions to be and'd once again.
See also