Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Advanced Find 'Or' function

(0) ShareShare
ReportReport
Posted on by

hello

has anyone else had issues with the 'OR' functionality in advanced find.  Dynamics 365 CRM

i have tried to do query but with 3 sets of different criteria and it just does not work.  the 'OR' function doesn't seem to work and all the results of data is incorrect

this is so we can do some data cleansing and remove the contacts that come up in these results

for example:

AV.png

*This post is locked for comments

  • RE: Advanced Find 'Or' function

    thanks i will give that a go

    the reason why they want to try get into one query is so that those are the records they would disable or delete

  • Suggested answer
    RE: Advanced Find 'Or' function

    Hello RJDP,

    Might I suggest starting with a smaller query and trying to make that work. Break your query down further into 4 queries and then find the correct record for each of those. If you're finding this difficult then theres no reason to try to do everything in a single query.

    For what it's worth, in your example the reason you're getting that contact is because of the block you highlighted doesn't exclude records which have data in address line 1, city and postcode. What you want to do is add those criteria to that AND block. If that isn't clear enough reply and I'll make up an example.

    Thanks,

    Shaun

  • RE: Advanced Find 'Or' function

    this is what i am trying to do but the criteria about the emails is causing issues in the result.  it needs to the 'OR' for all of the sections of requirements.  but the results still pull back records with an last name + address line 1 + city and postcode but these records have no email addresses.  

    AV2.png

  • ashlega Profile Picture
    ashlega 34,477 on at
    RE: Advanced Find 'Or' function

    Maybe the conditions should be slighly different then:

    It seems here is what they want to keep:

    OR

         AND

              Last Name contains data

              Address 1 contains data

              OR  

                  City contains data

                  Postcode contains data

         AND

              Last Name contains data

              OR  

                  Work Email contains data

                  Alternate Work Email contains data

                  Home Email contains data

    So, I think, here is what you need to find:

    AND

         OR

              Last Name does not contain data

              Address 1 does not contain data

              AND

                  City does not contain data

                  Postcode does not contain data

         OR

              Last Name does not contain data

              AND

                  Work Email does not contain data

                  Alternate Work Email does not contain data

                  Home Email does not contain data

  • RE: Advanced Find 'Or' function

    exactly it is so confusing - all i have is that the records they want to KEEP is the below. so i need to find the opposite

    The criteria for keeping a record is it must contain:

    Last Name +

    Address 1 + City or Postcode

    Or

    Last Name +

    Work Email or Alternate Work Email or Home Email

  • ashlega Profile Picture
    ashlega 34,477 on at
    RE: Advanced Find 'Or' function

    actually, might make sense to confirm the conditions since they can be read in a few different ways:)

    does not have a last name 'or' address 1 'and' a city 'or' postcode

    Is it everything where you have no last name OR you have no address 1 OR you have no city OR you have no postcode?

    Or is it everything wher eyou have no last name AND no address1 AND no city AND no postcode?

    Or is it everything where you have no last name AND ??

  • RE: Advanced Find 'Or' function

    By default I believe 'last name' is a required field, so unless you've done a bulk import in the past that will always contain a  value. I'd suggest you check that first.

  • RE: Advanced Find 'Or' function

    it only pulled back one records lol

    i am going to do some checking once i have exported it to excel

    thanks for your help though

  • RE: Advanced Find 'Or' function

    ignore my below comment, it does. i will give this as go.

    sorry i have to go through it my head a number of times :)

  • RE: Advanced Find 'Or' function

    does that cover this one too?   "does not have a last name 'or' address 1 'and' a city 'or' postcode"

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,432 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans