web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Business Central forum

Search for names with special character(s)

(0) ShareShare
ReportReport
Posted on by

When we try to search for a customer using customer name, we noticed an annoying problem: Dynamics 365 for Financials can't find the customer if the name contains some special characters, like '&'. For example, we have a customer named "P&N Bank", but we can't find any customer matching the search pattern "P&N". We can find the customer using "Bank", but if we have a lot of bank customers, it will be difficult to find the right one.

It's important for us to find customer by name, so we don't end up with different customer records for the same customer, when the customer orders many times.

Thanks in advance for any suggestion!

Categories:
I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hello, 

    I created the name in Chronus Inc., and tested search using a '?' as a wildcard in place of the '&' sign and it worked. The '*' didn't behave as well. 

    I hope this helps. 

    Ian 

  • Community Member Profile Picture
    on at

    Hi Ian,

    Thanks a lot, it worked!

    Dynamics 365 team might still want to record this as a bug, since '&' shouldn't be a special character in SQL search pattern.

  • Community Member Profile Picture
    on at

    Hi Eugene,

    Glad it worked! I know I read somewhere about XML not supporting the '&' character but I'm sure about SQL. Nevertheless, it should be noted somewhere in the '?' docs to use special characters in your search, but I didn't find anything.

    Regards,

    Ian

  • Andy365 Profile Picture
    80 on at

    A little over 2 years later and similar problem, but also found an answer.

    We had a preliminary naming convention "P & N" (space on either side of the ampersand.). Using Ian McKay's approach of '?' as a wildcard in place of the '&' sign did not work. The search will break on the customer list after typing "P ?". That being noted, "P *" and "P * " does return the "P & N" but any further qualification beyond "P * " (e.g. "P * N") will break the search, with no results.

    The answer to the issue is within the Sorting, Searching, and Filtering page (https://docs.microsoft.com/en-us/dynamics365/business-central/ui-enter-criteria-filters#-and).

    There may be instances where field values contain these symbols and you want to filter on them. To do this, you must include the filter expression that contains the symbol in quotation marks (''). For example, if you want to filter on records that start with the text S&R, the filter expression is 'S&R*'.

    And:

    &) And
    Sample Expression Records Displayed
    >200&<1200 Numbers greater than 200 and less than 1200

    So 'S&R*' and 'S & R*' 's&r*' and 's & r*' all work on Name search and filter.

    It may not be extremely end-user friendly, to have to explain the difference between an “&” operator in an expression and that “the ampersand is the logogram &, representing the conjunction ‘and.’” (en.wikipedia.org/.../Ampersand), but it does work as advertised.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans