Tip #926: How to find space

We did talk about wildcards and using some unorthodox search techniques before. But today’s tip is not a revision but rather an extension.

In one of the projects we had the need to find all contacts whose last names contain spaces (if you must know, that’s because last names were used as a base for a subdomain). Trying obvious “Last Name Contains <space>” condition immediately gives you “Provide a valid value for Last Name”. Dynamics 365, just like the nature, abhors a vacuum.

Wildcards to the rescue – enter the condition as “Last Name Contains * *” and Dynamics 365 oblidges.

For example, let’s find all last names with not one but two spaces! “Last Name Contains * * *” should get you the results:
Find last name with two spaces
 

One thought on “Tip #926: How to find space

  1. Peter Gulka says:

    Is there a variation of this to find records where the Name field BEGINS with a space? We have records that are created and named with a workflow that follows the pattern:

    [Contact Name] – [Some other field value]

    In some cases the workflow is run before the relevant Contact is present on the record, so we get names that appear like:

    ” – XYX ABC” and they have a leading space.

    We can find these relatively easily by sorting existing Views, but I can’t figure out how to build a View to look for all records that begin with ” – ” (blank dash blank)

Leave a Reply

Your email address will not be published. Required fields are marked *