Ascendix Search app helps you run complex, multi-criteria, and multi-object searches with a few clicks.
In this post, we'll explain how to use OR and NOT IN filter conditions to search for your Salesforce records. Also, make sure to read how to perform your first searches with Ascendix Search.
The OR Condition lets you group search criteria together to indicate an OR condition between the fields instead of always assuming an AND condition.
E.g., you can get a list of Accounts that are either from City Dallas or from State Oklahoma and from the Healthcare Industry.
To build this list:
Step 1. Select Account in Search For
Step 2. Add Search Criteria:
City equals Dallas
State/Province equals Oklahoma
Industry equals Healthcare
Ascendix Search: OR Condition
Step 3. Click on the Apply Filter Logic button (it is located on the right to Add Search Criteria button). You’ll notice that all search criteria were enumerated and the new text box Filter Logic was added at the bottom of the section.
Type (1 OR 2) AND 3 to define the required filter logic and click Search to get your results.
(1 OR 2) AND 3 means (City OR State/Province) AND Industry
1 – CITY
2 – State/Province
3 – Industry
How Does Filter Logic Work?
Ascendix Search follows Salesforce Filter Logic that governs how and when filters apply to your search results.
Use AND and OR operators to fine-tune your results by entering each criteria line number, separated by a filter logic operator.
For example, in our example above (1 OR 2) AND 3 finds records that match either Filter 1 or Filter 2, and Filter 3, i.e. City OR State AND Industry.
Once you click the Add Filter Logic button, Ascendix Search will enumerate all search criteria in the section starting with #1.
Good to Know:
- If you reorder fields or add a new field, the numbers are reapplied always in numeric order. So make sure to correct your filter logic to get the results you want.
- Grouping of criteria fields will only be supported within a section (not across relationships).
- A user can add the same field more than once, allowing for an “OR” condition for multiple values, e.g., Industry equals Healthcare OR Industry equals Biotechnology.
Search by Related Record with NOT IN Option
How to find accounts without contacts in Salesforce or how to get all accounts without opportunities? You can easily solve this task with NOT IN filter criteria in Ascendix Search!
Other сommon use cases where NOT IN feature helps:
- Find all accounts without cases
- Find leads without activities
- Find all contacts with the status “Prospect” I haven’t emailed in 6 months
- Find all contacts associated with a tenant rep deal who hasn’t had a property tour appointment in the last 30 days
- Find all contacts without tasks
How to perform such searches in Salesforce with Ascendix Search:
Ascendix Search: Finding All Contacts that we called today, but didn’t reach
Step 1. Select the object you want to Search For
Step 2. Define the needed criteria for this object
Step 3. Add child object and enter your criteria
Step 4. Click on the button ‘Exclude records matching the selected criteria.’
Please note that when the “Not In” mode is enabled, records matching the specified criteria for the child relationship will be omitted from search results.
That’s why you need to enter search criteria that are negative to what you want to achieve.
Example: Getting a List of Accounts Without Contacts
To make it more straightforward for you, let’s find all accounts without contacts:
- Select Account in Search For (because we want to get a list of accounts)
- We don’t have any other criteria for accounts that’s why we won’t enter any criteria this time.
- Click Add Section and Add Contacts
- Select a field that can’t be empty for your contacts, e.g., Last Name
- Set the Last Name is not blank
- Click on the button ‘Exclude records matching the selected criteria’
Ascendix Search: Finding all Accounts Without Contacts in Your Salesforce
In our example, we set first Set the Last Name is not blank to get a list of contacts with last name, i.e., existing contacts. Then we clicked “Exclude records matching the selected criteria’ to activate NOT IN option.
What is more, Ascendix Search lets you save this list to monitor new accounts without contacts in the future.
Good to know:
- The “Not In” mode is only available for child relationships
- It applies to the entire section, not individual fields
- It applies only to specified criteria; blank criteria are not included in the search