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 :
Small and medium business | Business Central, N...
Unanswered

rec.setfilter not working corect

(1) ShareShare
ReportReport
Posted on by 9
when I want to set up a filter in the setfilter and then find all the calls after the filter, I find nothing 

 CustomerRec.Reset();
                if ("Phone No 1" <> '') and ("Phone No 2" <> '') then begin
                    CustomerRec.SetFilter("Phone No.",'*%1*|*%2*', "Phone No 1", "Phone No 2");
                    if CustomerRec.FindSet() then
I have the same question (0)
  • Gerardo Rentería García Profile Picture
    25,388 Most Valuable Professional on at
    Hi
    Please try moving the wildcard to the side of the field.
     
    SETFILTER(name,'%1',OtherFieldValue + '*');
    BR
    GR
  • Netjacker2097 Profile Picture
    286 on at
    Hi,
     
    I think this should work.
     
    CustomerRec.Reset();
    if ("Phone No 1" <> '') and ("Phone No 2" <> '') then begin
        CustomerRec.SetFilter("Phone No.", '*%1*|*%2*', "Phone No 1", "Phone No 2");
        if CustomerRec.FindSet() then begin
            repeat
            until CustomerRec.Next() = 0;
        end;
    end;
     
    Thanks,
    M

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,132

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 675 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 665 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans