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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

OnLookup - SetFilter and regex?

(0) ShareShare
ReportReport
Posted on by 132

Hi all,

I am able to filter a field on a specific page to only include relevant results. 

However, I would like to implement a RegEx (or some method) so that I filter results once, and then filter again for results that start with 3 letters (E.g. ABC , DEF, CAT)

Any thoughts?

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    101,458 Super User 2026 Season 1 on at

    Hi, are these three letters fixed?

    If so it's relatively simple.

    For example, you can use following ABC* to represent data beginning with ABC.

    Item.SETFILTER("No.",'ABC*');

     

    Hope this can give you some hints.

    Thanks.

    ZHU

  • SammySevens Profile Picture
    132 on at

    Hi Zhu,

    I feel privileged to get an answer from you! I read your posts all the time!

    Unfortunately the letters are not fixed, what I'd like is to filter out anything that begins with 3 alphabetical letters ([a-z])

  • Suggested answer
    YUN ZHU Profile Picture
    101,458 Super User 2026 Season 1 on at

    Hi, In that case, you can try to extract the first three characters, and then use a loop to determine whether they are all alphabetical letters.

    The following is an example of judging whether it is a number, I think it can be used as a reference.

    http://adnavtech.blogspot.com/2017/06/how-to-check-string-is-number-or-letter.html

    Hope this helps.

    Thanks.

    ZHU

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,216 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,471 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,369

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans