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 :
Finance | Project Operations, Human Resources, ...
Answered

How to select characters inside a field (String)

(0) ShareShare
ReportReport
Posted on by 126

Hi guys!

I had job to update this field that will include new emails, now the new requirement is I have to delete some of those email names but confronted with this issue, since those emails on one field only (type is String), how do I select this field logicaly? kindly see my example below, 

email name to delete: john@example.com

example record1: james@exampe.com;john@example.com;fox@example.com

example record2: john@example.com;james@example.com;fox@example.com

your help guys is much appreciated, Thank you!

I have the same question (0)
  • Verified answer
    Satish Panwar Profile Picture
    14,671 Moderator on at

    Hi Kenneth,

    Can you see if function below works for you.

    imdaxershiv.blogspot.com/.../string-functions-in-ax-2014-1.html

    docs.microsoft.com/.../xpp-string-run-time-functions

  • Verified answer
    Blue Wang Profile Picture
    on at

    Hi Kenneth,

    You can use strScan to first confirm the existence of the character (note that it is case sensitive), and then use strReplace to process it.

    Crude code example:

    81864.PNG

    Note: When the destination email address is at the end, there will be  ";"  residues, so also need to confirm in advance.

  • Verified answer
    Martin Dráb Profile Picture
    237,884 Most Valuable Professional on at

    I'm not sure what you mean by to "logically" select a field.

    If you mean how to select records where a certain string is somewhere inside a field, use the like operator.

    select myTable
        where myTable.MyField like '*value*';

    Nevertheless note that it's very slow and that the whole problem is caused by a wrong database design (violating the first normal form). Instead of having a single field containing three addresses (for example), the correct design would be having a relation table with three records. Selecting data from such a table is trivial and very fast (because you can easily index the field). This is what relational databases are designed for.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 565 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans