Conditions are used when subsetting which records will be updated, exported, and/or searched, depending on the module. In most cases the option to use all records or specify conditions on which record(s) to use will be available.
When Use conditions is selected the conditions area is no longer greyed out and is open for criteria specification.
1. Select the Field on which to Base a Condition
- All fields (except long area text fields, i.e. "Description" fields) from the particular object and related objects, including custom fields, are available for selection
- To access fields in a related object select the triangle to the left of the object name to display the fields from the related object
- Multi-object join is available for Parent objects only, based on foreign key relationships between objects
- For example, the Account object can be accessed from within the Contact object, because the Account ID is physically stored on the Contact object, but the Contact object is NOT accessible from the Account object.
Quick ways to find a desired field:
1. Right click in the list of fields to bring up a Filter field option.
2. Type the first letter of a field name to scroll to the first field with that character.
1. Right click in the list of fields to bring up the filter field contains option
2. Type the keyword to search fields by and click Filter
3. Select the desired field (or fields if there is a checkbox)
- REPEAT Steps 2 (entering a new keyword) and 3 for all the desired fields
4. Click Reset to get the full list of fields again and close the window
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", "Last_N_Days:xxx" and "Next_N_Days:xxx", etc.
- Users will be prompted to enter the number of days desired
- Options for =, !=, < > are available
- For "Today" use 0 for the number of days, e.g if needing to specify "less than today", "greater than today" or "not equal today"
- For date and number fields, additional operators are included for specifying blank values (to specify blanks for text fields or empty values for picklist fields, leave the value box blank)
- Dates: "Empty Date" & "Not Empty Date"
- Numbers: "Equals Null" & "Not Null"
- "Like" & "NOT Like"
- Provides a mechanism for matching partial text strings and includes support for wildcards % and _
- The % wildcard matches zero or more characters:
- LastName LIKE appl_%, will return records with Last Name of Appleton, Apple and Applin but NOT Appl, Bapple
- BillingCountry Like %states, will return records with "united states"
- BillingCountry Like united%, will return records with "united states", "united kingdom" etc.
- The % could be also be used to find where something contains specified character patterns in a string:
- BillingState like %ss%tt% will return records with "massachusetts"
- AccountNumber like 0%9, will return records where the account number starts with a 0 and ends with a 9 (in one condition instead of 2)
- The _ wildcard matches exactly one character and can be used to determine if a fields is X characters long:
- BillingState Like __ (2 underscores), will return records with 2 character states
- BillingPostalCode Like _________ (9 underscores), will return records with 9 digit zip codes
- Could be used to find/reformat them as XXXXX-XXXX by using the following formula in MassImpact:
- Mid({billingpostalcode},1,5) + "-" + Mid({billingpostalcode},6,4)
- AccountNumber NOT Like __________, will return records where the Account Number is NOT 10 characters long
- Could be used to find Account Numbers that need to be padded with leading zeroes, or to find invalid Account Numbers
- Could be used to find/reformat them as XXXXX-XXXX by using the following formula in MassImpact:
- The % wildcard matches zero or more characters:
- Provides a mechanism for matching partial text strings and includes support for wildcards % and _
3. Specify a Value(s)
- Text Fields: Type in the value
- To "or" multiple values for the same field use commas. DO NOT PUT A SPACE AFTER THE COMMA.
- e.g. State = ma,nh,me will be translated to State = ma or State = nh or State = me
- Values entered are not case sensitive
- To specify a blank value, leave the value box empty
- 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)
- Right click the list of values to bring up additional selection options:
- Add Value - Allows for the addition of a value for selection purposes only
- This will not add a value as an active option to the picklist in Salesforce
- Use when filtering on the Task Subject field (combo picklist/text field) to add a custom text value
- Filter - Allows for easy searching a long picklist based on a character string to quickly find a value(s)
- Reset - Will strip all filters and added values and reset to the values in your Salesforce instance
- 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 for a date/time field (e.g. created date), specify 2 conditions to isolate the 24 hour period
- e.g. Created Date >= Jun 01 2010 00:00 AM, Created Date <= Jun 01 2010 11:59 PM
- The value is ignored when using an operator such as "Today" or "Yesterday"
- To isolate a specific day, regardless of time for a date/time field (e.g. created date), specify 2 conditions to isolate the 24 hour period
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 #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
- Updating Existing Conditions
1. Click on the box just to the left of the current condition to reload the details of the condition
2. Make the desired changes
3. Click the Update Condition button
5. Creating "OR Groups" (this option is not applicable to all modules)
- To create "OR" groups, check Expert Mode
- 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 (e.g. same group number) are AND'd and BETWEEN group (e.g. different group numbers) are OR'd
The above picture reads as:
(MailingState=ma AND LeadSource=External Referral) OR (MailingState=ny AND LeadSource= Trade Show)
Unchecking Expert Mode will cause all conditions to be AND'd once again