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 :
Microsoft Dynamics AX (Archived)

Reg filter in the fields in form

(0) ShareShare
ReportReport
Posted on by 568

Hi guys,

I have a form in which I created three fields namely,

Name 

checkbox

Window field

Now I have created a new text field in that form and now whenever I type starting letters it should filter that grid based on letters typed in that textbox.

Please give some suggestions.

Regards,

AXTechie

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rustem Galiamov Profile Picture
    8,072 on at

    Hi AXTechie2120!

    On your text field override textChange() method and after super() call yourTable_DS.executeQuery().

    On yourTable DS override executeQuery() method and write the following code:

    public void executeQuery()
    {
        if (yourTextField.valueStr())
            SysQuery::findOrCreateRange(this.query().dataSourceTable(tableNum(YourTable)), fieldnum(YourTable, YourField)).value(SysQuery::valueLike(yourTextField.valueStr));
        else
            this.query().dataSourceTable(tableNum(YourTable)).clearRange(fieldnum(YourTable, YourField));
    
        super();
    }


    But it's not good idea to executeQuery on every letter typing. Maybe will be enough to call executeQuery after you finish typing?

  • AXTechie2120 Profile Picture
    568 on at

    Hi Rustem,

    Thanks your reply,

    But my  requirement  is different.

    If i have four name like this,

    andrew, anderson etc,

    If I type a it should filter both names  and if i "andr" it should show only andrew ..

    How can i achieve this,

    Please advise.

    Regards,

    AX Techie

  • Suggested answer
    Rustem Galiamov Profile Picture
    8,072 on at

    Then you need to override modified() method on your text control, call executeQuery() after super(), put text like "andrew, anderson" or "andr*, anders*" and leave field or press Enter.

    And remove textChange() method.

  • AXTechie2120 Profile Picture
    568 on at

    Thanks  you Rustem

    I tried it just now.

    Is there anythere way with pressing the enter button

  • Rustem Galiamov Profile Picture
    8,072 on at

    What you mean by "Is there anythere way with pressing the enter button" ?

  • AXTechie2120 Profile Picture
    568 on at

    Sorry without pressing enter button.

    Moreover the filter searches for the letter that we  type and show all records that contains that letter but what i want is to show the record starting with that letter.

    Is there any modifications that i need  to do in that query.

    please advise.

  • Verified answer
    Rustem Galiamov Profile Picture
    8,072 on at

    Try to change SysQuery::valueLike() with SysQuery::valueLikeAfter()

  • AXTechie2120 Profile Picture
    568 on at

    Thank you rustem for your valuable time

    Regards,

    AX Techie

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans