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

Community site session details

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

Case In-sensitive searching from database table using Find Method

(0) ShareShare
ReportReport
Posted on by 65

Hi i am trying hard to find the way to search the record from the database table. (e.g: Product Details)

The  product details table contains the product names with alphanumeric values like 1000-UI-B , CFBR123.or TRNBK

The problem i am facing is that when the record exists in the database and i try to find it using the lower case or any case format like ( 1000-uI-B , cfbr123.or tRNbK) the record doesn't find from the database table.

here is the code in the screenshot

pastedimage1672304382705v1.png

when i write the exact name of the product it finds it perfectly.

Is there anything need to setup before find method for case insensitive searching?

I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,389 on at
    RE: Case In-sensitive searching from database table using Find Method

    hi

    try this

    productRec.SETRANGE(ProductName,ProductName);

    if productRec.findfirst then begin

    DAniele

  • Dev-Master Profile Picture
    65 on at
    RE: Case In-sensitive searching from database table using Find Method

    it didn't work in my case. cannot we make it to lower case before matching the product name like

    productRec.find('=').toLower() something like this?

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,045 Moderator on at
    RE: Case In-sensitive searching from database table using Find Method

    To achieve this you have to use a setfilter command and make the filter case insensitive using the @ in the beginning of your filter.

    learn.microsoft.com/.../ui-enter-criteria-filters

    So

    Record.setfilter(Name,'@yoursearch');

    If Record.findset then .............

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
Sumit Singh Profile Picture

Sumit Singh 2,674

#2
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 2,580

#3
YUN ZHU Profile Picture

YUN ZHU 2,115 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans